DevOps Interview DropIntermediate TierScenario+25 XP on read
A developer says their commit has disappeared. How do you investigate and get it back?
Core Summary
Commits are rarely deleted, they usually just lose their branch reference. git reflog records every move of HEAD locally, so a bad reset, rebase or checkout is almost always recoverable, and git fsck --lost-found catches most of the rest.
Hints
Hint 1: A commit with no branch pointing at it still exists
Hint 2: reflog is local and per-clone
Hint 3: Garbage collection is what finally removes it
Reported in interviews at Atlassian, GitLab