git commit 规范
规范的 commit 有助于管理软件版本历史及自动化
格式简述
一个 commit 信息的格式大致规定为:
<type>[optional scope]: <description>
-
type 类型,与Semantic Versioning配合:
fix
: 修复(用于表示PATCH
)feat
: 新功能(用于表示MINOR
)- 在类型后紧跟
!
表示一个前向不兼容变更(用于表示MAJOR
) - 其他类型,比如 @commitlint/config-conventional 中推荐使用的
build
、chore
、ci
、docs
、style
、refactor
、perf
、test
等 - 可选,用于提供改变的位置的作用域 e.g.
feat(parser): add ability to parse arrays.
-
可在下方添加描述和脚注