3 ms·
How to recover from a Git mistake
- keeperofdakeys 9y agoAnother useful command is `git reflog`, which records where the tips of branches previously were. So after a bad rebase or merge, it's easy to get back to the previous state. It's also good to know that by default, `git gc` will only prune unreferenced objects older than two weeks.