Safety Net — For screw-ups

git reflog

Sankara Rameswaran
Git Tips
2 min readAug 24, 2013

--

How many times have you screwed up a commit or a merge and wished you didn’t do it? If you use git or any VCS for that matter, that number would definitely be > 0. I really love the simplicity of git (I’m serious — that’s a post for another day). One of the most amazing features of git which could only be possible by its simplicity is

Git maintains a list of checkpoints which can accessed using reflog. You can use reflog to undo merges, recover lost commits or branches and a lot more.

--

--