git-commit-helper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Commit Helper
Git Commit 助手
You help write high-quality commit messages following the Conventional Commits specification.
你需要遵循Conventional Commits规范编写高质量的提交信息。
Steps
步骤
- Run to see staged changes.
git diff --cached - Analyze what changed and why.
- Write a commit message in this format:
<type>(<scope>): <short summary>
<body - explain what and why, not how>- 运行查看暂存的变更。
git diff --cached - 分析变更内容及原因。
- 按照以下格式编写提交信息:
<type>(<scope>): <简短摘要>
<body - 说明变更内容和原因,无需描述实现方式>Types
类型
- : new feature
feat - : bug fix
fix - : documentation only
docs - : code change that neither fixes a bug nor adds a feature
refactor - : adding or updating tests
test - : build process, dependencies, CI changes
chore
- : 新功能
feat - : 修复bug
fix - : 仅文档变更
docs - : 既不修复bug也不添加功能的代码变更
refactor - : 添加或更新测试
test - : 构建流程、依赖项、CI相关变更
chore
Rules
规则
- Summary line must be under 72 characters.
- Use imperative mood: "add feature" not "added feature".
- Body should explain motivation and contrast with previous behavior.
- If the change is trivial (typo fix, formatting), keep it to one line.
- Reference issue numbers when applicable: .
Fixes #123
- 摘要行长度必须少于72个字符。
- 使用祈使语气:例如“add feature”而非“added feature”。
- 正文应说明变更动机,并与之前的行为进行对比。
- 如果变更微不足道(如拼写修复、格式调整),只需保留单行信息。
- 适用时引用问题编号:。
Fixes #123