Git command builder
Turn a chosen git operation and a few fields into a ready-to-paste command, explained switch by switch.
Git command builder
Pick an operation — undoing a commit, renaming a branch, an interactive rebase, a cherry-pick, a stash, cleaning a file out of history, or recovering a branch you deleted by mistake — fill in the branch name, commit hash or message it needs, and this tool assembles the exact git command line you would otherwise look up or try to reconstruct from memory. It suits the moment you know what you want to do but not the precise flags, and anyone who would rather check a generated command against a plain-language explanation than paste one from a half-remembered forum thread.
Every operation offers a safe variant and a destructive one. Safe favors commands that are local, reversible or fail rather than overwrite something — git revert instead of a hard reset, a plain rename instead of a forced push. Destructive does what its name says: it force-pushes, force-resets or rewrites history outright, and the tool prints a warning above the command explaining what becomes unrecoverable. Turn on "Explain each switch used" for a line-by-line reference of every flag — what -i, --hard, -X theirs, --force-with-lease or -u actually does.
Branch fields accept only characters git allows in a ref name; commit hashes take short or long hex refs; free-text fields like a stash message keep their own script. "Also generate a gitconfig alias" wraps the finished command as one git config --global alias.<name> line to paste in and reuse later.
Everything runs in your browser. No git command is executed and nothing you type is sent anywhere — the tool only assembles text. Copy the result, download it as a .txt file, or send it to another tool's input to keep working on it.