commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCommit
提交
Generate a commit message and commit staged changes using git.
使用git生成提交信息并提交已暂存的变更。
Guidelines
指南
- Only generate the message for staged files/changes
- Don't add any files using - user decides what to add
git add - DO NOT add any ads or footers
- 仅为已暂存的文件/变更生成提交信息
- 不要使用添加任何文件——由用户决定要添加的内容
git add - 请勿添加任何广告或页脚
Format
格式
<type>(<scope>): <message title>
<bullet points summarizing what was updated><type>(<scope>): <message title>
<bullet points summarizing what was updated>Rules
规则
- Title: lowercase, no period, max 50 characters
- Scope: optional, feature affected
- Body: explain why, not just what
- Bullet points: concise and high-level
- 标题:小写,无句号,最多50个字符
- 作用域(Scope):可选,指受影响的功能
- 正文:解释原因,而非仅仅是内容
- 项目符号:简洁且突出重点
Allowed Types
允许的类型
| Type | Description |
|---|---|
| feat | New feature |
| fix | Bug fix |
| chore | Maintenance (tooling, deps) |
| docs | Documentation changes |
| refactor | Code restructure (no behavior change) |
| test | Adding or refactoring tests |
| style | Code formatting (no logic change) |
| perf | Performance improvements |
| 类型 | 描述 |
|---|---|
| feat | 新功能 |
| fix | 修复Bug |
| chore | 维护工作(工具、依赖) |
| docs | 文档变更 |
| refactor | 代码重构(无行为变更) |
| test | 添加或重构测试 |
| style | 代码格式化(无逻辑变更) |
| perf | 性能优化 |
Examples
示例
feat(auth): add JWT login flow
- Implemented JWT token validation logic
- Added documentation for the validation componentfix(ui): handle null pointer in sidebarrefactor(api): split user controller logic
- Extracted validation into separate module
- Simplified error handling flowfeat(auth): add JWT login flow
- Implemented JWT token validation logic
- Added documentation for the validation componentfix(ui): handle null pointer in sidebarrefactor(api): split user controller logic
- Extracted validation into separate module
- Simplified error handling flowFooter (optional)
页脚(可选)
- Reference issues:
Closes #123 - Breaking changes: Start with
BREAKING CHANGE:
- 引用问题:
Closes #123 - 破坏性变更:以开头
BREAKING CHANGE:
Avoid
注意避免
- Vague titles: "update", "fix stuff"
- Overly long or unfocused titles
- Excessive detail in bullet points
- 模糊的标题:比如"update"、"fix stuff"
- 过长或重点不明确的标题
- 项目符号中包含过多细节