Git Command Cheatsheet
Searchable reference of essential Git commands grouped by task. Click any command to copy.
Create a new empty Git repository in the current directory.
Clone a remote repository into a new local directory.
Set the name attached to your commits.
Set the email attached to your commits.
Show staged, unstaged, and untracked files.
Stage a specific file for the next commit.
Stage all changes in the current directory.
Commit staged changes with a message.
Stage all tracked changes and commit in one step.
List local branches; the current one is marked with *.
Create a new branch from the current commit.
Switch to an existing branch (modern alternative to checkout).
Create and switch to a new branch.
Merge the named branch into the current branch.
Delete a branch that has been merged.
List configured remote repositories and their URLs.
Download objects and refs from the remote without merging.
Fetch from the remote and merge into the current branch.
Upload local commits to the remote branch.
Push and set the upstream tracking branch.
Show commit history, one line per commit.
Show unstaged changes against the last commit.
Show changes that are staged for the next commit.
Show the changes and metadata for a specific commit.
Show who last modified each line of a file.
Discard unstaged changes to a file in the working tree.
Unstage a file while keeping its changes.
Undo the last commit, keeping changes staged.
Discard the last commit and all its changes. Destructive.
Create a new commit that undoes a previous commit.
Save uncommitted changes and revert to a clean tree.
Re-apply the most recently stashed changes and drop them.
List all stashed change sets.
Replace the last commit (edit message or add staged changes).
Reapply commits on top of another base branch.
Interactively squash, reorder, or edit the last n commits.
Apply the changes from a specific commit onto the current branch.
About Git Command Cheatsheet
A quick, searchable reference of the Git commands you actually use — staging, committing, branching, remotes, inspecting history, undoing changes, stashing, and rewriting history. Search by keyword or filter by category, and click any command to copy it. A fast memory aid for everyday Git.
All processing happens entirely in your browser using modern web APIs. Nothing is uploaded to our servers — your data stays local and private. Free to use forever.
Common use cases
- Remembering the exact syntax for an interactive rebase or cherry-pick
- Looking up how to undo the last commit safely
- Finding the modern git switch/restore equivalents of checkout
- Copying common commands without leaving the browser
- Onboarding to Git with a categorized command list
How it works
A curated list of common Git commands, each tagged with a task category, is filtered client-side. Search matches the command text and its description; category buttons narrow to a single workflow (Branches, Undo, Rewrite, etc.). Clicking a command copies it to your clipboard.