git-commits
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Commit Rules
Git 提交规则
When the user asks to commit, push, or save changes to git:
当用户要求对Git执行提交、推送或保存变更操作时:
MUST Use /commit Skill
必须使用 /commit Skill
DO NOT run directly. Instead:
git commitSkill("commit")The skill:
/commit- Removes Claude attribution from commits
- Generates reasoning.md capturing what was tried
- Clears build attempts for next feature
请勿直接运行命令,应使用:
git commitSkill("commit")/commit- 移除提交记录中的Claude署名
- 生成reasoning.md文件记录尝试过的操作
- 清除构建尝试记录,以便进行下一个功能开发
Why This Matters
为何这一点很重要
- Regular adds "Generated with Claude Code" and Co-Author lines
git commit - The skill removes these so commits appear user-authored
/commit - Reasoning capture preserves build history for future sessions
- 常规的会添加“Generated with Claude Code”和共同作者行
git commit - Skill会移除这些内容,让提交记录看起来像是用户本人提交的
/commit - 保留操作记录(reasoning)可以为后续会话留存构建历史
Trigger Words
触发词
When you see these in user prompts, use the commit skill:
- "commit", "push", "save changes"
- "push to github", "push changes"
- "commit and push"
当你在用户的提示中看到以下词汇时,请使用该提交Skill:
- "commit", "push", "save changes"
- "push to github", "push changes"
- "commit and push"
After Commit
提交之后
The skill will prompt you to run:
bash
bash "$CLAUDE_PROJECT_DIR/.claude/scripts/generate-reasoning.sh" <hash> "<message>"Then push if requested:
bash
git push origin <branch>该Skill会提示你运行:
bash
bash "$CLAUDE_PROJECT_DIR/.claude/scripts/generate-reasoning.sh" <hash> "<message>"如果用户要求推送,则执行:
bash
git push origin <branch>