Git Command Builder

Pick an action — branch, stash, undo, rebase — and get the exact git command plus a plain-English explanation.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The Git Command Builder turns “I want to undo my last commit” or “I need to stash this and switch branches” into the exact git command to run — and, just as importantly, a plain-English explanation of what every flag does. It is built for anyone who knows roughly what they want from Git but cannot always remember the precise incantation, and would rather understand a command than blind-copy it from a random forum answer.

How it works

Pick an action from one of seven categories — Branches, Commit & staging, Undo & history, Stash, Rebase & sync, Remotes & push, and Inspect & search — or just type what you are trying to do in the search box (it matches on the action name, summary, and tags, so “uncommit”, “shelve”, or “who changed this line” all find the right recipe). Each recipe shows a small form with only the fields that command actually needs: a branch name, a commit reference, a file path, a message, plus toggles for the options that genuinely change behaviour, such as force-deleting, including untracked files, or keeping changes staged versus unstaged.

As you fill in the form the command is rebuilt live, with shell-safe quoting applied automatically so paths or messages containing spaces and special characters never break. Alongside the command you get a “What it does” breakdown that explains each part in everyday language, and — for the genuinely dangerous operations like git reset --hard or a force-push — a clearly highlighted caution so you know exactly what is at stake before you press Enter. Everything is computed in your browser; no command, path, or message ever leaves your machine.

Example

Say you just made a commit but forgot to include a file and want to fix the message too. Open the Amend the last commit recipe, type your corrected message, tick “Stage all tracked changes first”, and the builder produces:

git add -u && git commit --amend -m 'fix: correct typo in README'

with an explanation that amending rewrites the most recent commit (and a reminder that if you already pushed it, you will need a --force-with-lease push afterwards).

You want to…The builder gives you
Undo last commit, keep workgit reset --soft HEAD~1
Throw away a file’s editsgit restore src/app.ts
Shelve work in progressgit stash push --include-untracked
Replay branch on latest maingit fetch origin && git rebase origin/main
Push safely after a rebasegit push --force-with-lease origin

Every command is generated locally — nothing is uploaded or stored.

Ad placeholder (rectangle)