Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
uses
· 5y ago · 0 comments
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".
Comments
[–]
rochacon
5y ago
Add `-p` (`--patch`) and then pick from the diff prompt what parts you want to restore. You can also use this flag with commit.