commit-helper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCommit Helper
提交信息助手
Generate well-structured commit messages following conventional commit format.
生成符合Conventional Commit格式的结构化提交信息。
Instructions
使用说明
- Run to see staged changes
git diff --staged - Analyze the changes to understand:
- What files were modified
- What type of change (feat, fix, refactor, docs, etc.)
- The scope/component affected
- Generate a commit message with:
- Summary line under 50 characters
- Type prefix (feat, fix, docs, refactor, test, chore)
- Optional scope in parentheses
- Detailed body explaining what and why
- 运行 查看暂存的变更
git diff --staged - 分析变更以明确:
- 哪些文件被修改
- 变更类型(feat、fix、refactor、docs等)
- 受影响的范围/组件
- 生成包含以下内容的提交信息:
- 不超过50个字符的摘要行
- 类型前缀(feat、fix、docs、refactor、test、chore)
- 可选的括号内的范围
- 解释变更内容和原因的详细正文
Commit Types
提交类型
- : New feature
feat - : Bug fix
fix - : Documentation changes
docs - : Code restructuring without behavior change
refactor - : Adding or updating tests
test - : Maintenance tasks
chore
- : 新功能
feat - : 修复Bug
fix - : 文档变更
docs - : 代码重构(无行为变化)
refactor - : 添加或更新测试
test - : 维护任务
chore
Best Practices
最佳实践
- Use present tense ("Add feature" not "Added feature")
- Explain what and why, not how
- Keep summary concise but descriptive
- Reference issue numbers when applicable
- 使用现在时态(例如“Add feature”而非“Added feature”)
- 解释做了什么以及为什么这么做,而非如何实现
- 摘要简洁且具有描述性
- 适用时引用问题编号
Example Output
示例输出
feat(auth): add OAuth2 support for GitHub login
- Implement OAuth2 flow with PKCE
- Add token refresh mechanism
- Store tokens securely in encrypted storage
Closes #123feat(auth): add OAuth2 support for GitHub login
- Implement OAuth2 flow with PKCE
- Add token refresh mechanism
- Store tokens securely in encrypted storage
Closes #123