commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Commit
Git提交
Context
背景信息
Run in parallel:
- (never -uall)
git status git diff HEADgit log --oneline -10
并行执行以下命令:
- (切勿使用-uall参数)
git status git diff HEADgit log --oneline -10
Message Style
提交信息风格
Match repo's existing commit patterns from log.
- Extreme concision, sacrifice grammar for brevity
- Focus on "why" not "what"
- Imperative mood
匹配日志中仓库现有的提交模式。
- 极度简洁,为简洁性牺牲语法
- 聚焦于“原因”而非“内容”
- 使用祈使语气
Workflow
工作流程
- Review status and diff
- Analyze recent commit style from log
- Stage files explicitly (avoid or
git add .)-A - Commit with HEREDOC format matching repo style
- Run after to verify
git status
- 查看状态和差异
- 从日志中分析近期提交风格
- 显式暂存文件(避免使用或
git add .)-A - 使用HEREDOC格式提交,匹配仓库风格
- 提交后执行以验证
git status
Rules
规则
- NEVER amend unless requested
- NEVER skip hooks
- NEVER commit secrets
- Only commit when requested
- Match existing commit patterns
- 除非被要求,否则绝不修改提交(amend)
- 绝不跳过钩子
- 绝不提交机密信息
- 仅在被请求时提交
- 匹配现有提交模式