Git · Senior · Question 6 of 76
Why can a commit that's no longer on any branch still be recovered?
- 1Unreferenced commits are moved to a hidden branch
- ✓Correct answer: The reflog keeps it reachable until it expires
- 3Git keeps a backup copy on the remote forever
Explanation
Reflog entries count as references for gc, by default 90 days for reachable and 30 for unreachable entries. After that the objects become prunable.