git commit规范
commit message通用规范
场景
在进行git commit提交时, 要进行相关说明, 好的说明应言简意赅, 让人快速明白本次提交代码有哪些变动, 有相关的commit message规范来进行参考
相关内容
commit message结构
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
例子
fix(middleware): ensure Range headers adhere more closely to RFC 2616
Add one new dependency, use `range-parser` (Express dependency) to compute
range. It is more well-tested in the wild.
Closes #2310
type类型:
- feat
- fix
- perf
- docs
- style
- refactor
- test
- chore
scope类型:
- init
- runner
- watcher
- config
- web-server
- proxy
- etc
subject里使用一般现在时, 要清晰表明本次修改内容或目的
footer可以加上解决的issue, 或者是BREAKING CHANGE