Prompt file imported from brain-bootstrap/claude-code-brain-bootstrap (
.claude/commands/git.md). Fill in{{arguments}}before use. Copyright stays with the author.
Manage Git workflow: {{arguments}}
Pre-loaded context
Branch: !git branch --show-current
Status: !git status --short 2>/dev/null | head -15
Recent commits: !git --no-pager log --oneline -5 2>/dev/null || echo "N/A"
Instructions
⚠️ NEVER git push autonomously — present summary + proposed command, wait for user confirmation.
Determine action from arguments:
| Argument | Action |
|---|---|
status |
git status + git --no-pager log --oneline -5 |
branch |
git branch --show-current |
branches |
git --no-pager branch -a | head -30 |
stash |
git stash |
stash pop |
git stash pop |
rebase main |
git fetch origin main && git rebase origin/main |
commit <message> |
git add -A && git commit -m "<message>" |
amend |
git add -A && git commit --amend --no-edit |
log |
git --no-pager log --oneline -20 |
conflicts |
grep -rn '^<<<<<<<|^=======|^>>>>>>>' . |
Branch naming convention:
- Feature:
feat/<ticket-id>-<short-description> - Fix:
fix/<ticket-id>-<short-description> - Chore:
chore/<description>
Pre-push checklist (present to user):
- ✅ Build passes
- ✅ Tests pass
- ✅ Lint clean on changed files
- ✅ No conflict markers in repo
- ✅ Diff review complete (merge-base aware)
- 📋 Proposed command:
git push origin <branch> - ⏳ Waiting for user confirmation...