Create Pull Request
Use gh for all GitHub tasks. Never update git config.
Before creating
Run in parallel:
git status
git diff
git diff --staged
git branch -vv
git log origin/main..HEAD --oneline
git diff origin/main...HEAD
Adjust main if the base branch differs.
Steps
- Push if needed:
git push -u origin HEAD - Create PR:
gh pr create --title "Title" --body "$(cat <<'EOF'
## Summary
- Bullet 1
- Bullet 2
## Test plan
- [ ] Step to verify
EOF
)"
- Return the PR URL to the user.
Body rules
- Summary: 1–3 bullets on why, not a file list
- Test plan: concrete checklist
- Review all commits on the branch, not just the latest
Do not
- Use
gitinteractive flags (-i) - Push or force-push unless asked