Your Git Cheatsheet
100%
When Things Go Wrong
| Situation | Command |
|---|---|
| I want to undo my uncommitted edits | git restore |
| I staged a file by mistake | git restore --staged |
| I committed something wrong | git revert HEAD |
| I need to pause my work | git stash → do other work → git stash pop |
| I made a typo in my last commit message |
Learn Git in a Day
Everything you need, nothing you don'tEnroll now to unlock all content and receive all future updates for free.
Unlock now $9.99$7.49Learn More
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
