Conventional Commits 约定式提交
Conventional Commits Cheat Sheet.
格式
<type>(<scope>): <short summary>
# commit type 类型: build|ci|doc|docs|feat|fix|perf|refactor|
# test|website|chore|style|type|revert
# commit scope 范围: animations|bazel|benchpress|common|compiler|
# compiler-cli|core|elements|forms|http|
# language-service|localize|platform-browser|
# platform-browser-dynamic|platform-server|
# router|service-worker|upgrade|zone.js|
# packaging|changelog|docs-infra|migrations|
# ngcc|ve|devtools
# commit short summary 简短描述: 50 characters or less. Do not end the summary with a period.
常用
| 类型 | 描述 |
|---|---|
feat | 新特性 |
fix(scope) | 修复 scope 中的 Bug |
feat! / feat(scope)! | breaking change / 重构 API |
chore(deps) | 更新依赖 |
commit type 说明
| 类型 | 描述 |
|---|---|
build | 变更影响的是 构建系统 或者 外部依赖 (如:gulp, npm) |
ci | 修改了 CI 配置文件或脚本 (如:Github Action, Travis) |
* chore | 变更不影响源代码或测试 (如更新了辅助工具、库等) |
docs | 只修改了文档 |
* feat | 一个新特性 |
* fix | 修复了一个 Bug |
perf | 增强性能的代码变更 |
refactor | 并非修复 Bug 或添加新特性的代码变更 |
revert | 回退代码 |
style | 变更不影响一些有意义的代码 (如:删除空格、格式化代码、添加分号等) |
test | 添加测试代码或修正已有的测试 |