Git Cheatsheet
Essential Git commands with explanations, examples, and quick copy.
Frequently Asked Questions
Is this page running Git commands for me or just showing examples?
It is a static reference, not a live Git client. The search, tabs, and copy buttons only work against the built-in command list.
Can I switch between a short command reminder and the full syntax?
Yes. The toggle flips each card between the short command form and the more complete syntax string, and you can still copy either the full command or the example.
Does it use modern undo commands like git restore, or older checkout-based advice?
It uses modern commands for common undo flows. The Undoing section includes git restore and git restore --staged rather than leaning on git checkout for everything.
Will search look through examples too, or just command names?
Search is broad. It matches against the category, title, short command, full syntax, description, and example text for every entry.
Does this warn me before I copy a destructive command like git reset --hard?
No. The sheet includes destructive commands as reference entries and gives a short description, but there is no safety check or confirmation prompt.