Git Command Cheat Sheet
Quick reference for common Git commands. Search and copy commands instantly.
Basics
git initInitialize a new repositorygit clone <url>Clone a repositorygit statusShow working tree statusgit add <file>Stage a filegit add -pStage changes interactivelygit commit -m "msg"Commit staged changesgit commit --amendAmend last commitgit restore <file>Discard local changesBranching
git branchList branchesgit branch <name>Create a branchgit checkout -b <name>Create and switch branchgit switch <name>Switch branchgit merge <branch>Merge branch into currentgit rebase <branch>Rebase current branch onto anothergit branch -d <name>Delete a branchRemote
git remote -vList remotesgit fetchDownload remote changesgit pullFetch + merge remote changesgit pushUpload local commitsgit push -u origin <branch>Push and set upstreamInspect & Undo
git log --oneline --graphVisual historygit diffUnstaged changesgit diff --stagedStaged changesgit reset --soft HEAD~1Undo last commit, keep changesgit reset --hard HEAD~1Undo last commit and changesgit stashTemporarily shelve changesgit stash popRestore shelved changesgit revert <commit>Create reverse commitTags & Release
git tag v1.0.0Create a taggit push --tagsPush tagsgit describe --tagsNearest tag descriptionAbout 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
- Paste your code, markup or configuration into the editor.
- Choose the output format or options offered.
- The formatted result updates live.
- 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
JSON Sorter
Sort JSON keys alphabetically, deep-sort nested objects and export clean JSON.
Unstringify JSON
Convert escaped JSON strings back to readable objects instantly.
Stringify JSON
Convert JavaScript objects to JSON strings with advanced formatting options.
XSS Vulnerability Checker
Scan text or HTML for potential cross-site scripting (XSS) attack patterns.