Git Commit PR Workflow
Use this skill for end-to-end git delivery from working tree to pull request.
Workflow
- 1. Inspect branch state, diff against default branch, and existing PR state.
- Create a feature branch if still on the default branch.
- Stage and commit the relevant changes.
- Push the branch.
- Create or update the PR with a short title, summary bullets, and test plan.
Guardrails
- - No destructive git commands unless explicitly requested.
- No force push to default branches.
- Keep PR titles short and bodies structured.
- Avoid committing secrets or unrelated changes.
Example Requests
- - Commit this work, push it, and open a PR.
- Take the current changes to a polished PR with a test plan.
Inputs
- - Current git state
- Default branch
- Optional user instructions
Outputs
- - New commit
- Pushed branch
- Created or updated PR
Success Criteria
- - The right files were committed.
- The branch was pushed safely.
- The PR body accurately reflects the diff.
Non-Goals
- - Force-push workflows by default
- Interactive git rebases
Source Provenance
Derived from
src/commands/commit-push-pr.ts.
Git提交与PR工作流
使用此技能完成从工作树到拉取请求的端到端Git交付。
工作流程
- 1. 检查分支状态、与默认分支的差异以及现有PR状态。
- 如果仍在默认分支上,则创建一个功能分支。
- 暂存并提交相关更改。
- 推送分支。
- 使用简短标题、摘要要点和测试计划创建或更新PR。
防护措施
- - 除非明确要求,否则不使用破坏性Git命令。
- 不强制推送到默认分支。
- 保持PR标题简短,正文结构清晰。
- 避免提交机密信息或不相关的更改。
示例请求
- - 提交此工作,推送它,并打开一个PR。
- 将当前更改整理成一个带有测试计划的完善PR。
输入
输出
成功标准
- - 正确的文件已被提交。
- 分支已安全推送。
- PR正文准确反映了差异。
非目标
来源溯源
源自src/commands/commit-push-pr.ts。