Skip to content
agentscamp

Git Commands

A curated collection of 7 git commands for building with AI coding agents.

Command

Clean Branches

Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review, then delete with the safe -d variant.

/clean-branches
Command

Commit

Stage changes and write a Conventional Commits message describing them.

/commit
Command

Create PR

Push the current branch and open a GitHub pull request with a generated title and body.

/create-pr[base branch or notes]
Command

Git Bisect

Drive git bisect to find the exact commit that introduced a regression.

/git-bisect<bug description; optional good and bad refs>
Command

Git Undo

Safely reverse the last Git operation in the current repo — pick the right tool (restore, reset --soft/--mixed, revert, or reflog recovery) based on what happened and whether it was already pushed, and confirm before anything destructive.

/git-undo<what to undo — e.g. 'last commit', 'unstage file X', 'the bad merge'; empty to detect>
Command

Resolve Merge Conflicts

Walk through resolving the in-progress merge, rebase, or cherry-pick conflict in the current repo by understanding both sides, then verify before continuing.

/resolve-conflict
Command

Sync Branch

Fetch and rebase the current branch onto its base, resolving conflicts and verifying the build.

/sync-branch[base branch]