Oops - How to Undo Anything
30%
Summary
Here's a quick reference for the commands you learned in this chapter:
| Situation | Command |
|---|---|
| Discard uncommitted changes to a file | git restore |
| Unstage a file (keep changes) | git restore --staged |
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:
