Sometimes you might accidentally pull changes from a remote repo by running
git pull origin master inadvertently overwriting local changes.
Fortunately there may be a way to go back to the pre-pulled state.
git reflog. This will provide an output like this:
You can revert to one of these commits. E.g.:
Git will output a message:
HEAD is now at 60a22c5 Side commenting system and you’ll be back at this commit.
comments powered by Disqus