Git UndoLesson 38Free preview
Git Reflog
This lesson is part of Git · All levels
Summary
Reflogs (reference log) record every movement of HEAD and other references in a local repository, such as when commit, checkout, reset, or rebase. Because these records are local and temporarily stored (default 90 days), reflogs become a lifesaver when commits or branches appear to be lost due to risky operations.
Key points
- Git reflog displays the history of the movement of HEAD
- Reflogs are local, not cloned or pushed
- The reflog records are inherently expired after 90 days
- HEAD@{n} refers to a specific position in a reflog
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.