All chapters in this track
- 011. The Mental Model
- 022. Essential Setup
- 033. Core Daily Workflow
- 044. Branching
- 055. Merging & Conflict Resolution
- 066. Rebasing
- 077. Remote Repositories
- 088. Stashing
- 099. Undoing Things
- 1010. Tagging & Versioning
- 1111. Cherry-Pick
- 1212. Git Bisect & Blame
- 1313. Git Hooks
- 1414. Submodules
- 1515. Team Workflows
- 1616. Power Commands & Aliases
- 1717. Reflog: The Safety Net
- 1818. Practice Tasks
- 19Quick Reference Cheatsheet
Chapter 19 of 19
Quick Reference Cheatsheet
SETUP git config --global user.name/email/editor
git init | git clone <url>
DAILY git status | git diff | git diff --staged
git add -p | git add . | git commit -m ""
git log --oneline --graph --all
BRANCH git switch -c <name> | git branch -d <name>
git branch -a | git branch --merged
MERGE git merge <branch> | git merge --no-ff
git merge --abort | git mergetool
REBASE git rebase main | git rebase -i HEAD~N
(never rebase shared/public branches)
REMOTE git fetch | git pull --rebase | git push
git push -u origin <branch>
git remote -v | git branch -r
STASH git stash push -m "name" | git stash pop
git stash list | git stash drop
UNDO git restore --staged <file> (unstage)
git restore <file> (discard working dir)
git reset --soft HEAD~1 (undo commit, keep staged)
git reset HEAD~1 (undo commit, keep unstaged)
git reset --hard HEAD~1 (undo commit, discard all)
git revert HEAD (safe undo for pushed commits)
TAG git tag -a v1.0.0 -m "msg" | git push origin --tags
CHERRY-PICK git cherry-pick <hash>
BISECT git bisect start | git bisect bad | git bisect good <tag>
git bisect reset
BLAME git blame file | git log -S "term" -- file
REFLOG git reflog | git reset --hard HEAD@{N}
(your safety net — 90 day history of all HEAD movements)
Last updated: 2026-08-19