Git commit 提交规范

Git GitHub About 542 words

格式

  • type:提交的类型,必填。
  • scope:影响的范围,可选。
  • subject:简要描述,不超过50个字符,必填。
type(scope): subject

type 类型

  • feat:新功能
  • fix:修复bug
  • docs:文档变更
  • merge:代码合并
  • style:代码格式改变
  • refactor:已有功能重构
  • perf:性能优化
  • test:增加测试
  • build:改变了构建工具,如Maven变为Gradle
  • revert:撤销上一次commit
  • chore:构建过程或辅助工具的变动
  • ci:持续集成相关

scope 说明

scope根据项目不同可以填写:数据层、控制层、视图层。

例如在Angular,可以是locationbrowsercompilerootScopengHrefngClickngView等。如果你的修改影响了不止一个scope,你可以使用*代替。

示例

示例一:

feat(DAO): 新增用户列表查询

示例二:

perf(View): 页面卡顿优化

参考

https://github.com/angular/angular/commits/master

https://zhuanlan.zhihu.com/p/182553920

Views: 1,977 · Posted: 2021-05-21

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh