Your Git Cheatsheet
83%
Undoing Things
| Command | What It Does |
|---|---|
git restore | Discard uncommitted changes (back to last commit) |
git restore --staged | Unstage a file (keep the changes, just remove from staging) |
git revert HEAD | Create a new commit that reverses the most recent one |
git revert |
Learn Git in a Day
Everything you need, nothing you don'tEnroll now to unlock all content and receive all future updates for free.
