Developer Cheatsheet Hub
Searchable quick-reference cheatsheets for Git, React Hooks, JavaScript, CSS, the terminal, and more.
Basics
8git initCreate a new local repository
git clone <url>Clone a remote repository
git statusShow working tree status
git add <file>Add files to staging area
git add .Stage all changes
git commit -m "message"Commit staged changes
git log --onelineShow commit history (compact)
git diffShow unstaged changes
Branches
9git branchList all local branches
git branch <name>Create a new branch
git checkout <name>Switch to a branch
git checkout -b <name>Create and switch to a new branch
git merge <branch>Merge branch into current
git branch -d <name>Delete a branch (safe)
git rebase <branch>Rebase current branch onto another
git switch <name>Modern way to switch branches (Git 2.23+)
git switch -c <name>Create and switch to a new branch (modern)
Remote
5git remote add origin <url>Add a remote repository
git push -u origin <branch>Push branch and set upstream
git pullFetch and merge remote changes
git fetchDownload remote changes without merging
git remote -vShow remote URLs
Undo & Fix
8git reset HEAD <file>Remove file from staging
git checkout -- <file>Discard working directory changes
git commit --amendModify the last commit
git revert <hash>Create a new commit that undoes changes
git stashTemporarily save uncommitted changes
git stash popRestore stashed changes
git restore <file>Discard working directory changes (modern, replaces checkout --)
git restore --staged <file>Remove file from staging area (modern, replaces reset HEAD)
About this tool
Cheatsheet Hub
The Cheatsheet Hub is a searchable collection of quick-reference guides for the things developers look up most often: Git commands, React Hooks, JavaScript array methods, CSS Flexbox, Tailwind classes, terminal commands, and more.
Each cheatsheet is concise and example-driven so you can find the exact syntax in seconds instead of digging through documentation. It is free to browse.
Frequently asked questions
Cheatsheet Hub FAQ
- What is a developer cheatsheet?
- A cheatsheet is a condensed quick reference that collects the most-used commands, syntax, or methods for a topic in one place, so you can recall them fast without reading full documentation.
- Which topics are covered?
- Topics include Git, React Hooks, JavaScript arrays, CSS Flexbox, Tailwind CSS, terminal commands, and more, with new sheets added over time.
- Can I search across the cheatsheets?
- Yes. The hub is fully searchable, so you can jump straight to a command or method across every cheatsheet.
- Are the cheatsheets free?
- Yes. All cheatsheets in the hub are free to browse, no account required.