Git Cheat Sheet
Searchable Git cheat sheet: setup, branching, merging, rebasing, stashing, undoing mistakes and remotes, each with a plain explanation. Copy any command.
Runs in your browser. Nothing is uploaded.
About Git Cheat Sheet
The Git commands developers reach for most, grouped by task and explained in a sentence each: setting up, everyday commits, inspecting history, branching and merging, rebasing, stashing, working with remotes and undoing mistakes.
Search for what you want to do, such as undo, rename branch or discard changes, then copy the command with one click.
How to use Git Cheat Sheet
- Open the tool above and add your file or text.
- Adjust the options to suit.
- Download or copy the result. Nothing is uploaded at any point.
Frequently asked questions
How do I undo the last commit but keep my changes?
git reset --soft HEAD~1 removes the commit and leaves the changes staged.
Is it safe to rewrite pushed history?
Avoid it on shared branches. If you must, use git push --force-with-lease, which refuses to overwrite work you haven't seen.
Is Git Cheat Sheet free and private?
Yes. Git Cheat Sheet is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.