While creating some content for my “Using Git Effectively” course, I discovered something new and amazingly useful. You may know about Git’s reflog and that it provides a chronological history of where your HEAD has been so that you can recover orphaned commits.
For some things though, it can be hard to use. For example, if you deleted a branch and then changed your mind, it can be difficult to find that commit in the reflog.
There is an easier way. Did you know you can view a graphical representation of all the commits in your reflog using git log?
If you’d like to learn about how to recover commits in Git, and how to make Git fit into your workflow, check out our Use Git Effectively course. We currently have a free preview available.