Loading...
Loading...
Compare original and translation side by side
<type>(<scope>): <description>| Type | When to use |
|---|---|
| A new capability, component, or behavior the project didn't have before (new skill, feature, command, config option). Not just any new file — purpose matters. |
| Correcting broken or incorrect behavior |
| Changes to documentation only (README, comments, markdown) |
| Restructuring existing code without changing behavior or adding features |
| Routine upkeep with no behavior change — bumping versions, updating lockfiles, adding |
| Adding or updating tests |
| Changes to CI/CD pipelines or workflow files |
| Undoing a previous commit |
!feat!:<type>(<scope>): <description>| 类型 | 使用场景 |
|---|---|
| 项目此前不具备的新能力、组件或行为(如新技能、功能、命令、配置项)。并非任意新文件——用途才是关键。 |
| 修复已损坏或错误的行为 |
| 仅对文档进行修改(README、注释、Markdown文件) |
| 重构现有代码,不改变功能或添加新特性 |
| 日常维护工作,不改变功能——如版本升级、更新锁文件、添加 |
| 添加或更新测试用例 |
| 修改CI/CD流水线或工作流文件 |
| 撤销之前的提交 |
!feat!:git diff --cached --name-onlygit status --short # list all changed and untracked files
git diff --name-only # list modified files with actual diff contentgit statusgit diffgit add <file1> <file2>git diff --cached<generated message>1231git commit -m "<generated message>"23git diff --cached --name-onlygit status --short # 列出所有已变更和未跟踪的文件
git diff --name-only # 列出有实际差异内容的已修改文件git statusgit diffgit add <file1> <file2>git diff --cached<生成的信息>1231git commit -m "<生成的信息>"23.envgit add.envgit add