3 ms·
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 "
by uses 5y ago
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 5y agoAdd `-p` (`--patch`) and then pick from the diff prompt what parts you want to restore. You can also use this flag with commit.