Git Cheat Sheet

Interactive reference for 60+ Git commands. Search, copy, and export.

๐Ÿ” Live Search

Filter 60+ commands instantly by name, command, or description.

๐Ÿ“‹ One-Click Copy

Click to copy any command to your clipboard. Ready to paste in your terminal.

๐Ÿ“ฅ Export

Download as Markdown or print to PDF for offline reference.

โญ Frequency Badges

Most-used commands are highlighted so you can find them fast.

Frequently Asked Questions

How do I undo my last commit? โ–ผ
Use git reset --soft HEAD~1 to undo the commit but keep your changes staged. Use git reset --hard HEAD~1 to discard everything. See the Undoing section.
What's the difference between git merge and git rebase? โ–ผ
Merge creates a merge commit preserving full history. Rebase replays commits on top of the target branch for a linear history. Rebase rewrites history โ€” avoid on shared branches. See Merging and Advanced.
How do I recover a deleted branch? โ–ผ
Use git reflog to find the commit hash, then git checkout -b branch-name <hash> to recreate it. See the Undoing section.

Stay Updated

Get notified when we add new commands and features.