实力内容
markdown
你你你
目前没有统一的强制的代码提交注释规范,社区有一些规范,这里着重介绍Angular规范https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines。
CHANGELOG.md
1 | <type>(<scope>): <subject> |
总体要求,每行字符不得超过72个或100个,避免自动换行
type:说明本次commit的类别,只允许使用
This reverts commit <hash>.
,其中的hash是被撤销 commit 的 SHA 标识符。1 | revert: feat(pencil): add 'graphiteWidth' option |
scope:说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同
subject: commit 目的的简短描述,不超过50个字符
注意:<type>(<scope>): <subject>
只有一行,包括三个字段:type(必需)、scope(可选)和subject(必需)
1 | 以动词开头,使用第一人称现在时,比如change,而不是changed或changes |
body:对本次 commit 的详细描述,可以分成多行
1 | More detailed explanatory text, if necessary. Wrap it to |
footer:只在两种情况出现,不兼容的变动,关闭issue
不兼容变动描述以BREAKING CHANGE开头,后面是变动描述和变动理由及其迁移方法
1 | BREAKING CHANGE: isolate scope bindings definition has changed. |
关闭issue则以Closes开头
1 | Closes #123, #245, #992 |
Commitizenhttps://github.com/commitizen/cz-cli
validate-commit-msghttps://github.com/kentcdodds/validate-commit-msg
conventional-changeloghttps://github.com/ajoslin/conventional-changelog
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment