Quick reference for common Git commands — searchable by category
git init | Initialize a new repository |
git clone <url> | Clone a remote repository |
git config --global user.name "Name" | Set global username |
git config --global user.email "email" | Set global email |
git status | Show working tree status |
git add <file> | Stage a file |
git add . | Stage all changes |
git commit -m "message" | Commit staged changes |
git commit --amend | Amend last commit |
git branch | List branches |
git branch <name> | Create a branch |
git checkout <branch> | Switch to branch |
git checkout -b <branch> | Create and switch to branch |
git merge <branch> | Merge branch into current |
git branch -d <branch> | Delete a branch |
git remote -v | List remotes |
git push origin <branch> | Push to remote |
git pull | Fetch and merge from remote |
git fetch | Fetch from remote (no merge) |
git log | Show commit history |
git log --oneline | Compact commit history |
git diff | Show unstaged changes |
git stash | Stash current changes |
git stash pop | Apply stashed changes |
The Git Command Cheat Sheet is a quick searchable reference for the most common Git commands, organized by category. Browse Setup, Staging, Branching, Remote, and Log commands — or search by keyword to find exactly what you need.
Zero server lag. All calculations run locally on your device for maximum speed.
Your data never leaves your device. No uploads, no servers, no tracking.
These commands work with Git 2.x and above, which covers the vast majority of modern Git installations.
Use git reset --soft HEAD~1 to undo the last commit while keeping changes staged, or git reset --hard HEAD~1 to discard changes entirely.
git fetch downloads changes from the remote but doesn't merge them. git pull fetches and immediately merges into your current branch.
Yes, completely free with no sign-up required.