5 ms·
How to undo git checkout . ?
by jhasse 7y ago
How to undo
git checkout .
?
- airstrike 7y agoThat's like asking how to undo `rm -rf`
- nemetroid 7y agoIt really is. Sure, it is an issue that it's the same subcommand as you use for many other things (which is being worked on with git switch/restore), but there is no other context where you'd do `git checkout .` if it wasn't your direct intention to get rid of changes in your workspace.
- jhasse 7y agoMercurial creates backup files though.
- Rusky 7y agoThe only way for `git checkout .` to blow away an entire month of work is if you didn't add or commit anything for an entire month.
- jhasse 7y agoFair enough ;)