git reflog registra dove è stata la HEAD del tuo branch — ogni commit, checkout, reset, rebase, ecc. È una rete di sicurezza per recuperare i commit "persi" (dopo un reset errato, rebase fallito o cancellazione di un branch) che sembrano scomparsi ma sono ancora recuperabili.
Cos'è 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.
