git reflog records where your branch's HEAD has been — every commit, checkout, reset, rebase, etc. It's a safety net for recovering "lost" commits (after a bad reset, rebase, or branch deletion) that seem gone but are still recoverable.
What reflog is
The REFLOG logs every movement of HEAD (and branch tips) in YOUR local repo:
→ every commit, checkout, reset, rebase, merge, etc. is recorded with a reference
→ it's LOCAL and includes commits not reachable from any branch (the "lost" ones)
→ Even if you reset/rebase away commits, reflog remembers where they were.
