git reflog rejestruje, gdzie znajdowała się HEAD Twojej gałęzi — każdy commit, checkout, reset, rebase itp. To sieć bezpieczeństwa do odzyskiwania "utraconych" commitów (po złym resecie, rebasing'u lub usunięciu gałęzi), które wydają się zniknięte, ale są nadal możliwe do odzyskania.
Co to jest 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.
