Git Commands Cheatsheet

The everyday Git commands, grouped and searchable — copy any one.

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

This is a searchable reference of the everyday Git commands developers reach for — grouped by task, each with a plain-English description and a one-click copy button. It’s built for the moments when you remember what you want to do (“undo last commit”, “rename a branch”) but not the exact flag.

How it works

The commands are organised into topic groups: setup & config, staging & committing, branching, remotes & syncing, history & inspection, and undoing & recovery. Type into the search box and the list filters live, matching both the command text and its description — so searching “undo” surfaces git reset and git revert even though neither contains the word. Click Copy next to any entry to put the exact command on your clipboard. Everything is bundled into the page and runs in your browser; nothing you type or copy is sent anywhere.

Example

You committed too early and want to keep the changes but redo the commit. Search “undo”, and the cheatsheet surfaces:

GoalCommand
Undo last commit, keep changes stagedgit reset --soft HEAD~1
Reverse a commit with a new commitgit revert <commit>
Discard unstaged edits to a filegit restore <file>
Save work aside temporarilygit stash then git stash pop

Copy git reset --soft HEAD~1, paste it into your terminal, and your last commit is undone with the changes still staged, ready to recommit. Everything runs in your browser; nothing is uploaded.

Ad placeholder (rectangle)