git-commits

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git 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
git commit
directly. Instead:
Skill("commit")
The
/commit
skill:
  1. Removes Claude attribution from commits
  2. Generates reasoning.md capturing what was tried
  3. Clears build attempts for next feature
请勿直接运行
git commit
命令,应使用:
Skill("commit")
/commit
Skill的作用:
  1. 移除提交记录中的Claude署名
  2. 生成reasoning.md文件记录尝试过的操作
  3. 清除构建尝试记录,以便进行下一个功能开发

Why This Matters

为何这一点很重要

  • Regular
    git commit
    adds "Generated with Claude Code" and Co-Author lines
  • The
    /commit
    skill removes these so commits appear user-authored
  • Reasoning capture preserves build history for future sessions
  • 常规的
    git commit
    会添加“Generated with Claude Code”和共同作者行
  • /commit
    Skill会移除这些内容,让提交记录看起来像是用户本人提交的
  • 保留操作记录(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>