04.Commit的语义规范
在提交代码时,简明的comment message
能明确直白交代本次的更改,有助于后期快速查看。而一个简明的提交格式为:
格式: <type>(<scope>): <subject>
其中<scope>
是个选项.
example
feat: allow overriding of webpack config
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
The various types of commits:
feat
: (new feature for the user, not a new feature for build script)fix
: (bug fix for the user, not a fix to a build script)docs
: (changes to the documentation)style
: (formatting, missing semi colons, etc; no production code change)refactor
: (refactoring production code, eg. renaming a variable)test
: (adding missing tests, refactoring tests; no production code change)chore
: (updating grunt tasks etc; no production code change)Use
lower case not title case!