git
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Conventional Commits
Git Conventional Commits
Standardized commit message format for clean git history.
用于打造清晰Git历史的标准化提交信息格式。
Instructions
使用说明
1. Commit Format
1. 提交格式
<type>(<scope>): <description>
[optional body]
[optional footer(s)]<type>(<scope>): <description>
[optional body]
[optional footer(s)]2. Commit Types
2. 提交类型
| Type | Description | Example |
|---|---|---|
| New feature | |
| Bug fix | |
| Documentation | |
| Formatting | |
| Code restructure | |
| Performance | |
| Tests | |
| Build system | |
| CI/CD | |
| Maintenance | |
| 类型 | 说明 | 示例 |
|---|---|---|
| 新增功能 | |
| 修复Bug | |
| 文档更新 | |
| 代码格式调整 | |
| 代码重构 | |
| 性能优化 | |
| 测试相关 | |
| 构建系统调整 | |
| CI/CD配置 | |
| 日常维护 | |
3. Scope (Optional)
3. 作用域(可选)
Scope indicates the affected area:
feat(auth): add OAuth support
fix(cart): correct total calculation
refactor(api): restructure endpoints作用域用于标识受影响的代码区域:
feat(auth): add OAuth support
fix(cart): correct total calculation
refactor(api): restructure endpoints4. Breaking Changes
4. 破坏性变更
feat(api)!: change response format
BREAKING CHANGE: API response now uses camelCase keysfeat(api)!: change response format
BREAKING CHANGE: API response now uses camelCase keys5. Examples
5. 示例
bash
undefinedbash
undefined✅ Good
✅ 规范示例
feat(user): add profile picture upload
fix(checkout): resolve payment validation error
docs(api): add authentication endpoints
refactor(components): extract common button styles
feat(user): add profile picture upload
fix(checkout): resolve payment validation error
docs(api): add authentication endpoints
refactor(components): extract common button styles
❌ Bad
❌ 不规范示例
update code
fixed bug
WIP
misc changes
undefinedupdate code
fixed bug
WIP
misc changes
undefined6. Multi-line Commits
6. 多行提交信息
feat(dashboard): add analytics widget
- Add chart component for daily stats
- Integrate with analytics API
- Add loading skeleton
Closes #123feat(dashboard): add analytics widget
- Add chart component for daily stats
- Integrate with analytics API
- Add loading skeleton
Closes #123