git reflog beleži, kjer je bila HEAD veja — vsak commit, checkout, reset, rebase itd. Je varnostna mreža za obnovitev »izgubljenih« commitov (po slabem resetu, rebaseu ali brisanju veje), ki se zdijo izgubljeni, vendar so še vedno obnovljivi.
Kaj je reflog
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.
