Sequence NODE_345
MediumUnderstand git reflog vs git log
Git & GitHub
Technical Specification
Experiment with commit, reset, and checkout, then observe the difference between git log and git reflog.
Input/Output Samples
Input:git reflog
Output:HEAD@{0}, HEAD@{1} ... history of actions
Optimal Logic Path
git reflog
# pick old hash from reflog
git reset --hard <hash-from-reflog>Architectural Deep-Dive
git log shows reachable commits in branches; git reflog shows HEAD movement and lets you recover 'deleted' history.