Cheatsheet Format: Web
Git Commands Cheatsheet
Everyday Git commands for branching, rebasing, recovering work and keeping history clean.
Abhishek Sharma 2026-08-02 Tools & Workflow / Git
Daily flow
git switch -c feature/nav
git add -p
git commit -m "feat: add responsive nav"
git push -u origin HEAD
Inspecting history
git log --oneline --graph --decorate -20
git diff --stat origin/main...HEAD
git blame -L 20,40 src/app.ts
Recovering work
git reflog
git restore --source=HEAD~1 path/to/file
git cherry-pick <sha> Want more like this?
Browse every cheatsheets in the library, organised by topic.
Related learning
Cheatsheet
JavaScript DOM Cheatsheet
The selectors, traversal methods, events and mutation APIs you actually use, on one printable page.
Programming / JavaScript
JavaScriptDOM
Web