git reflog logs every HEAD movement — even after reset, rebase, or branch deletion.
Lost commits?
git reflog → find the hash
git reset --hard <hash> → restore
Deleted branch?
git reflog → find tip
git branch <name> <hash> → recreate
Entries expire: 90 days (reachable), 30 days (unreachable).