Git提交规范可以参考Angular的提交规范说明
每个提交都包含header、body和footer三个部分,格式如下:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
header有三个部分:type、scope和subject,其中scope是可选的
type有以下几种:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
- …
vscode中可以使用插件git-commit-plugin来辅助规范提交