Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
uses
on Aug 1, 2021
|
parent
|
context
|
favorite
| on:
New in Git: switch and restore
I use restore quite a lot but it kind of terrifies me that it can erase any amount of uncommitted work if I type something wrong. "git restore ." is basically "delete everything that I don't have a backup of".
rochacon
on Aug 2, 2021
[–]
Add `-p` (`--patch`) and then pick from the diff prompt what parts you want to restore. You can also use this flag with commit.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: