commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCommits 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-guidelinesDependencies
依赖项
- 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
必须执行的步骤
-
Check Staging Status: Runto confirm what changes are staged
git status -
Review Staged Changes: Useto review the content of staged changes
git diff --staged -
Create Commit: Commit the staged changes with an appropriate commit message
-
Verify Commit: Runafter committing to confirm the commit was successful
git status
-
检查暂存状态:运行确认已暂存的更改内容
git status -
查看暂存更改:使用查看暂存更改的具体内容
git diff --staged -
创建提交:使用合适的提交信息提交暂存的更改
-
验证提交:提交后运行确认提交成功
git status
Commit Message Guidelines
提交信息准则
- Follow the template format
.gitmessage - Use appropriate commit type prefixes: ,
feat,fix,refactor,docs,style,testchore - Write clear, concise messages that describe the change
- 遵循模板格式
.gitmessage - 使用合适的提交类型前缀:、
feat、fix、refactor、docs、style、testchore - 撰写清晰、简洁的信息来描述更改内容
⚠️ Important Constraints
⚠️ 重要约束
- Never use any commands – Only commit what is already staged
git add - 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如果您已完成更改暂存:
undefinedStaged 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