Git Commit Conventions
Commit Message Format
Use semantic commit format: INLINECODE0
Commit Types
- -
feat: add new feature - INLINECODE2 : correct bug
- INLINECODE3 : update documentation
- INLINECODE4 : format code (no functional changes)
- INLINECODE5 : restructure code
- INLINECODE6 : add/modify tests
- INLINECODE7 : update build tasks
Workflow Rules
- 1. Language: Use English only for git commit messages.
- 2. Force Push: Always confirm before
git push --force.
- 3. Sign-off: Include
--signoff flag with all commits.
- 4. Consolidation: Consolidate changes into meaningful commits.
- 5. Push Confirmation: After making a local commit, ALWAYS prompt the user whether they want to push to the remote repository.
- 6. Display URL: After successfully pushing to remote, display the repository's access URL.
Git 提交规范
提交信息格式
使用语义化提交格式:<类型>(<范围>): <主题>
提交类型
- - feat:添加新功能
- fix:修复错误
- docs:更新文档
- style:格式化代码(无功能变更)
- refactor:重构代码
- test:添加/修改测试
- chore:更新构建任务
工作流规则
- 1. 语言:Git 提交信息仅使用英文。
- 2. 强制推送:执行 git push --force 前务必确认。
- 3. 签名:所有提交需包含 --signoff 标志。
- 4. 整合:将变更整合为有意义的提交。
- 5. 推送确认:完成本地提交后,始终询问用户是否要推送到远程仓库。
- 6. 显示 URL:成功推送到远程后,显示仓库的访问 URL。