commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Commits staged changes with an appropriate commit message using the git-operations-specialist skill.
借助git-operations-specialist skill,使用合适的提交信息提交暂存的更改。

Core Guidelines

核心准则

Before starting any task, read and follow
/key-guidelines

开始任何任务前,请阅读并遵循
/key-guidelines

Dependencies

依赖项

  • use git-operations-specialist skill
  • 使用git-operations-specialist skill

Instructions

操作说明

IMPORTANT: Use the git-operations-specialist skill (via Skill tool) for ALL git-related operations in this command.
Analyze the staged changes and safely commit them with an appropriate commit message.
重要提示:本命令中所有与git相关的操作,都需通过Skill工具使用git-operations-specialist skill。
分析暂存的更改,并使用合适的提交信息安全提交。

Required Execution Items

必须执行的步骤

  1. Check Staging Status: Run
    git status
    to confirm what changes are staged
  2. Review Staged Changes: Use
    git diff --staged
    to review the content of staged changes
  3. Create Commit: Commit the staged changes with an appropriate commit message
  4. Verify Commit: Run
    git status
    after committing to confirm the commit was successful
  1. 检查暂存状态:运行
    git status
    确认已暂存的更改内容
  2. 查看暂存更改:使用
    git diff --staged
    查看暂存更改的具体内容
  3. 创建提交:使用合适的提交信息提交暂存的更改
  4. 验证提交:提交后运行
    git status
    确认提交成功

Commit Message Guidelines

提交信息准则

  • Follow the
    .gitmessage
    template format
  • Use appropriate commit type prefixes:
    feat
    ,
    fix
    ,
    refactor
    ,
    docs
    ,
    style
    ,
    test
    ,
    chore
  • Write clear, concise messages that describe the change
  • 遵循
    .gitmessage
    模板格式
  • 使用合适的提交类型前缀:
    feat
    fix
    refactor
    docs
    style
    test
    chore
  • 撰写清晰、简洁的信息来描述更改内容

⚠️ Important Constraints

⚠️ 重要约束

  • Never use any
    git add
    commands
    – Only commit what is already staged
  • Use HEREDOC – Maintain proper formatting of commit messages
  • Stage verification first – Always check what's staged before committing
  • Single commit – Create one commit for all currently staged changes
  • 禁止使用任何
    git add
    命令
    ——仅提交已暂存的内容
  • 使用HEREDOC——保持提交信息的格式规范
  • 先验证暂存内容——提交前务必检查已暂存的内容
  • 单次提交——为当前所有暂存的内容创建一个提交

Example Usage

使用示例

If you have already staged changes:
undefined
如果您已完成更改暂存:
undefined

Staged files:

已暂存文件:

  • apps/api/src/routes/timeline.ts
  • apps/api/src/types/timeline.ts

This command will create a single commit containing both files with an appropriate message like:
feat: タイムラインAPIのルートと型定義を追加
undefined
  • apps/api/src/routes/timeline.ts
  • apps/api/src/types/timeline.ts

本命令将为这两个文件创建一个单次提交,提交信息示例如下:
feat: タイムラインAPIのルートと型定義を追加
undefined