git reflog inarekodia mahali ambapo HEAD ya tawi lako imekuwa — kila commit, checkout, reset, rebase, n.k. Ni wavu wa usalama kwa kurejesha commits "zilizopotea" (baada ya reset mbaya, rebase iliyokosewa, au kufuta tawi) ambazo zinasemekana zimepotea lakini bado zinaweza kurekebishwa.
Reflog ni nini
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.
