commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Commit

Git提交

Context

背景信息

Run in parallel:
  • git status
    (never -uall)
  • git diff HEAD
  • git log --oneline -10
并行执行以下命令:
  • git status
    (切勿使用-uall参数)
  • git diff HEAD
  • git 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

工作流程

  1. Review status and diff
  2. Analyze recent commit style from log
  3. Stage files explicitly (avoid
    git add .
    or
    -A
    )
  4. Commit with HEREDOC format matching repo style
  5. Run
    git status
    after to verify
  1. 查看状态和差异
  2. 从日志中分析近期提交风格
  3. 显式暂存文件(避免使用
    git add .
    -A
  4. 使用HEREDOC格式提交,匹配仓库风格
  5. 提交后执行
    git status
    以验证

Rules

规则

  • NEVER amend unless requested
  • NEVER skip hooks
  • NEVER commit secrets
  • Only commit when requested
  • Match existing commit patterns
  • 除非被要求,否则绝不修改提交(amend)
  • 绝不跳过钩子
  • 绝不提交机密信息
  • 仅在被请求时提交
  • 匹配现有提交模式