Git Command Cheatsheet

Searchable reference of everyday Git commands for branching, undoing and inspecting history.

Setup & clone
git initStart a new repository
git clone <url>Clone a remote repository
git remote -vList remotes
git remote add origin <url>Add a remote
Daily flow
git status -sbShort status with branch info
git add -pStage changes hunk by hunk
git commit -m "msg"Commit staged changes
git commit --amend --no-editAdd to the last commit
git push -u origin HEADPush and track current branch
git pull --rebasePull and replay local commits
Branching
git switch -c feature/xCreate and switch to a branch
git switch mainSwitch branch
git branch -d feature/xDelete merged branch
git merge --no-ff feature/xMerge with a merge commit
git rebase mainRebase onto main
git cherry-pick <sha>Apply one commit elsewhere
Undo & rescue
git restore <file>Discard working changes
git restore --staged <file>Unstage a file
git reset --soft HEAD~1Undo last commit, keep changes
git reset --hard origin/mainForce local to match remote
git revert <sha>Create an inverse commit
git reflogFind lost commits
git stash push -m "wip"Stash work in progress
git stash popRestore stashed work
Inspect
git log --oneline --graph --allVisual commit graph
git diff --stagedDiff staged changes
git blame -L 10,20 <file>Who changed these lines
git show <sha>Inspect a commit
git bisect startBinary-search a bad commit
Cleanup
git clean -fdDelete untracked files & dirs
git gc --prune=nowGarbage collect
git fetch --pruneDrop deleted remote branches
git rm --cached <file>Stop tracking a file

How to use Git Command Cheatsheet

  1. 1
    Open Git Command Cheatsheet

    Open the git command cheatsheet on Easutil — there is nothing to install and no account to create.

  2. 2
    Add your input

    Paste or type your code or payload into the input area, or adjust the options shown above the result.

  3. 3
    Review the output

    Git Command Cheatsheet updates the formatted result instantly as you type, so you can iterate without pressing a button.

  4. 4
    Copy or download

    Use the Copy button to grab the result, or download it where a file export is offered.

Common use cases

  • Quickly process your code or payload while debugging
  • Share a clean, readable result with a teammate
  • Avoid pasting sensitive data into an unknown online service

Git Command Cheatsheet FAQ

Is Git Command Cheatsheet free to use?

Yes. Git Command Cheatsheet is completely free on Easutil, with no signup, no usage limits and no watermarks.

Is my data private when I use Git Command Cheatsheet?

Yes. Git Command Cheatsheet runs entirely in your browser using JavaScript — your input is never uploaded to a server or stored anywhere.

Do I need to install anything to use Git Command Cheatsheet?

No. It works in any modern browser on desktop and mobile — Chrome, Firefox, Safari and Edge.

Does Git Command Cheatsheet work offline?

Once the page has loaded, git command cheatsheet keeps working without a network connection because all the processing happens client-side.

Looking for something similar? Browse all developer tools on Easutil →

Related tools

All →