Git提交描述规范 1 2 3 4 5 type(<scope>):<空格><subject><空格>#<github-ref-id> <换行> <body> <换行> <footer>
type
name
description
feat
新功能(feature)
fix
修复bug
docs
仅仅修改了文档(documentation)
style
仅仅是对格式进行修改,如逗号、缩进、空格等。不改变代码逻辑
refactor
重构(即不是新增功能,也不是修改bug的代码变动)
perf
优化相关,如提升性能、用户体验等
test
测试用例,包括单元测试、集成测试
chore
改变构建流程、或者增加依赖库、工具等
revert
版本回滚
scope
用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同。
subject
commit 目的的简短描述,不超过50个字符
以动词开头,使用第一人称现在时,比如change,而不是changed或changes
第一个字母小写
结尾不加句号
github-ref-id
关联bug修复或者已完成特性,issue or feature
示例 1 2 3 4 5 6 7 8 9 10 fix(ui): Ensure Range headers adhere more closely to RFC 2616 #2310 To add new dependency use `range-parser`to compute the range. It is more well-tested in the wild. BREAKING CHANGE: port-runner command line option has changed to runner-port. To migrate your project, change all the commands, where you use --port-runner to --runner-port. content_paste
emoji 指南 gitmoji
emoji
emoji 代码
commit 说明
调色板
:art:
改进代码结构/代码格式
火焰
:fire:
移除代码或文件
bug
:bug:
修复 bug
急救车
:ambulance:
重要补丁
火花
:sparkles:
引入新功能
备忘录
:memo:
撰写文档
火箭
:rocket:
部署功能
口红
:lipstick:
更新 UI 和样式文件
庆祝
:tada:
初次提交
白色复选框
:white_check_mark:
增加测试
锁
:lock:
修复安全问题
苹果
:apple:
修复 macOS 下的问题
企鹅
:penguin:
修复 Linux 下的问题
旗帜
:checked_flag:
修复 Windows 下的问题
书签
:bookmark:
发行/版本标签
警车灯
:rotating_light:
移除 linter 警告
施工
:construction:
工作进行中
绿心
:green_heart:
修复 CI 构建问题
下降箭头
:arrow_down:
降级依赖
上升箭头
:arrow_up:
升级依赖
工人
:construction_worker:
添加 CI 构建系统
上升趋势图
:chart_with_upwards_trend:
添加分析或跟踪代
锤子
:hammer:
重大重构
减号
:heavy_minus_sign:
减少一个依赖
鲸鱼
:whale:
Docker 相关工作
加号
:heavy_plug_sign:
增加一个依赖
扳手
:wrench:
修改配置文件
地球
:globe_with_meridians:
国际化与本地化
铅笔
:pencil2:
修复 typo