Your Git Cheatsheet
89%
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.
