Git Message提交模板

发表于: 2023-01-05 07:34:36

简介: Git Message提交模板

规范使用较多的是 Angular 团队的规范, 如下:

<type>(<scope>): <subject>
// 空行
<body>
// 空行
<footer>

type: commit 的类型 (必填)

Type 作用
feat 新增特性 (feature)
fix 修复 Bug(bug fix)
docs 修改文档 (documentation)
style 代码格式修改(white-space, formatting, missing semi colons, etc)
refactor 代码重构(refactor)
perf 改善性能(A code change that improves performance)
test 测试(when adding missing tests)
build 变更项目构建或外部依赖(例如 scopes: webpack、gulp、npm 等)
ci 更改持续集成软件的配置文件和 package 中的 scripts 命令,例如 scopes: Travis, Circle 等
chore 变更构建流程或辅助工具(比如更改测试环境), 对非 src 和 test 目录的修改
revert 代码回退
mod 不确定分类的修改
wip 开发中
types 类型修改

scope: commit 影响的范围 (选填)
比如: login, route, component, utils 等

subject: 提交简述 (必填)

body: commit 具体修改内容 (选填)
可以多行

footer: 备注 (选填)
通常是 BREAKING CHANGE 或修复的 bug 的链接

最后更新于:2023-03-16 14:51:58