Commit message-Angular 规范

一、格式化Commit message的好处:

  • 提供历史信息,方便浏览。
  • 提取过滤commit。
  • 从commit中提取console log。

二、Commit message的格式

  • ():
  • //空一行
  • //空一行

其中Header是必需的,body和footer可以省略。


1.type

用于说明commit的类别。

feat : 新功能(feature )
fix : 修补bug
docs:文档(documentation)
style: 格式(不影响代码运行的变动)
refactor: 重构(既不新增,也不修改bug的代码变动)
test:增加测试
chore:构建过程或辅助工具的变动

2.subject

commit目的的简短描述,不超过50个字符。

  • 动词开头,比如change,而不是changed或changes
  • 第一个字母小写
  • 结尾不加句号

3.**body **

说明变动的动机,以及与以前行为的对比

4.footer

只用于两种情况。

  • 不兼容代码。以BREAKING CHANGE开头,后面是描述、变动理由和迁移方法。

    BREAKING CHANGE: issolate scope bingings definition has changed.
    To migrate the code follow the example below:
    Before:
    scope:{
    myAttr:'attribute'
    }
    After:
    scope:{
    myAttr:'@',
    }
    The removed 'inject 'wasn't generaly useful for directives so there should be no code using it.
  • 关闭issuse.

参考资料

你可能感兴趣的:(Commit message-Angular 规范)