git-commit-push

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Commit & Push

Git Commit & Push

提交改动并推送到 origin 远端,不创建 PR。
Commit changes and push to the origin remote without creating a PR.

触发条件

Trigger Conditions

当用户要求提交改动并 push(但不需要提 PR)时使用此 skill。
This skill is used when the user requests to commit changes and push (but does not need to create a PR).

执行步骤

Execution Steps

  1. 创建新分支
    git checkout -b <branch-name>
    ,分支名由用户指定或根据改动内容自动生成。如果用户希望直接在当前分支提交,则跳过此步。
  2. Review 改动:先用
    git status
    git diff
    自行检查所有改动,确保没有把临时文件、调试代码或不相关的文件混进来。
  3. 暂存文件
    git add
    相关改动文件。不要使用
    git add -A
    git add .
    ,而是逐个添加相关文件。
  4. 提交改动
    bash
    git commit --signoff --author="Cheney Zhang <chen.zhang@zilliz.com>" -m "<commit message>"
    • commit message 用英文编写,简洁描述改动内容。
    • 绝对不要在 commit message 中提及 AI、Claude、LLM 或任何自动生成相关的字样。
  5. 推送分支
    git push origin <branch-name>
  1. Create a new branch:
    git checkout -b <branch-name>
    , the branch name is specified by the user or automatically generated based on the changes. If the user wants to commit directly to the current branch, skip this step.
  2. Review changes: First use
    git status
    and
    git diff
    to check all changes yourself to ensure that no temporary files, debugging code or unrelated files are included.
  3. Stage files: Use
    git add
    to add relevant changed files. Do not use
    git add -A
    or
    git add .
    ; instead, add relevant files one by one.
  4. Commit changes:
    bash
    git commit --signoff --author="Cheney Zhang <chen.zhang@zilliz.com>" -m "<commit message>"
    • The commit message should be written in English and concisely describe the changes.
    • Never mention AI, Claude, LLM or any words related to automatic generation in the commit message.
  5. Push the branch:
    git push origin <branch-name>
    .

注意事项

Notes

  • 提交前检查是否有未暂存的改动需要处理。
  • 所有 commit 都需要
    --signoff
    ,作者为 "Cheney Zhang chen.zhang@zilliz.com"。
  • commit message 中不能出现任何 AI 相关字样。
  • Check if there are any unstaged changes that need to be handled before committing.
  • All commits require
    --signoff
    , with the author being "Cheney Zhang chen.zhang@zilliz.com".
  • No AI-related words can appear in the commit message.