Compare

git log vs reflog

How to choose between project history and your local reference history when investigating Git state.

`git log` shows commit history reachable from refs such as branches. `git reflog` shows how your local refs moved over time, which makes it especially useful for recovery after resets, rebases, and accidental checkouts.

Use Log When

You want to inspect normal commit history on a branch.

You are reviewing author, commit, and branch-level history that is part of the project graph.

Use Reflog When

You are trying to recover work after moving HEAD, resetting, rebasing, or checking out the wrong place.

You want to see where your local refs pointed recently, even if that history is no longer easy to reach.

Rule of Thumb

Log shows project history. Reflog shows your local reference movement.

Want the short version? Browse the compact sheet views and save the commands you use most into a Cheatbook.