Inspect reference updates for a named branch.
Section: Reflog Basics
Show reflog for a specific branch
bash
bash
git reflog show mainExplanation
Useful when the recovery target involves a branch ref rather than the current HEAD movement.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Reflog Basics
Preview reflog expiration impact
See what would be pruned from reflog without changing anything.
Recover work into a new branch
Create a new branch from a reflog entry without moving current branch yet.
Search reflog for deleted branch tips
Find likely commit hashes for branch recovery.
Restore branch to a reflog entry
Move the current branch back to a previous recorded state.