3 ms·
I just wanted to point out vim's persistent undo: http://stackoverflow.com/questions/5700389/using-vims-persistent-undo http://stackoverflow.com/questions/57003
by relate 12y ago
I just wanted to point out vim's persistent undo: http://stackoverflow.com/questions/5700389/using-vims-persistent-undo http://stackoverflow.com/questions/5700389/using-vims-persis...
Sometimes I forget to commit, and suddenly I'm in the middle of a second feature, with the code in a non-working state. Then it's perfect to just undo back a couple of hours, save, commit, and redo back to where I am.
However, It's rather risky though if you're not confident with the undo system, so it's a good idea to save the file to a temporary location first.
- godDLL 12y agoOr use `git stash`. Or use `git add -p`.