Git Command Cheat Sheet

Quick reference for common Git commands. Search and copy commands instantly.

Basics

git initInitialize a new repository
git clone <url>Clone a repository
git statusShow working tree status
git add <file>Stage a file
git add -pStage changes interactively
git commit -m "msg"Commit staged changes
git commit --amendAmend last commit
git restore <file>Discard local changes

Branching

git branchList branches
git branch <name>Create a branch
git checkout -b <name>Create and switch branch
git switch <name>Switch branch
git merge <branch>Merge branch into current
git rebase <branch>Rebase current branch onto another
git branch -d <name>Delete a branch

Remote

git remote -vList remotes
git fetchDownload remote changes
git pullFetch + merge remote changes
git pushUpload local commits
git push -u origin <branch>Push and set upstream

Inspect & Undo

git log --oneline --graphVisual history
git diffUnstaged changes
git diff --stagedStaged changes
git reset --soft HEAD~1Undo last commit, keep changes
git reset --hard HEAD~1Undo last commit and changes
git stashTemporarily shelve changes
git stash popRestore shelved changes
git revert <commit>Create reverse commit

Tags & Release

git tag v1.0.0Create a tag
git push --tagsPush tags
git describe --tagsNearest tag description

About Git Command Cheat Sheet

Quick reference for common Git commands. Search and copy commands instantly.

Git Command Cheat Sheet is a searchable quick reference that keeps every Git command you reach for within one keystroke. Categories cover staging and commits, branching and merging, rebasing, stashing, remotes, inspecting history, undoing mistakes and advanced surgery like cherry-pick and bisect. Type a keyword such as rebase or conflict and matching commands appear instantly with a one-line explanation of when to use them and what the flags actually do. Each row has a copy button, so the exact command lands on your clipboard ready for the terminal, and a dark friendly layout makes it easy to scan during a live debugging session. Favourites stay pinned for the commands you use daily. Git Command Cheat Sheet is free, works offline, and is aimed at beginners who need guidance as well as experienced developers who simply forget rarely used flags.

How to Use Git Command Cheat Sheet

  1. Paste your code, markup or configuration into the editor.
  2. Choose the output format or options offered.
  3. The formatted result updates live.
  4. Copy or download the finished code.

Key Features

  • Clean, consistently formatted output ready to paste.
  • Supports the common formats used in web development.
  • One-click copy and download — no build step required.

Frequently Asked Questions

Can I search Git Command Cheat Sheet by task instead of memorizing commands?

Yes. The search box matches command names, flags and plain descriptions, so typing merge conflict or undo last commit surfaces the right rows even if you do not know the exact syntax. Filter by category, pin the commands you use daily, and copy any row to the clipboard with one click. Everything works offline after the first load.

Is Git Command Cheat Sheet free to use?

Yes. Git Command Cheat Sheet is completely free with unlimited use — no account, download or payment required.

Is my data uploaded to a server?

No. Git Command Cheat Sheet runs entirely in your browser. Your inputs are never sent to our servers or stored anywhere.

Does Git Command Cheat Sheet work on mobile?

Yes. The interface is fully responsive and works in any modern browser on Android, iPhone, tablets and desktops.

Related Code Tools

Browse all 47 Code Tools →