Git reflog: A developer’s last resort
Did you run git reset --hard and wipe yesterday’s work? Or delete a branch that “was no longer needed,” only to need it an hour later? Do not panic. In Git it is almost impossible to lose something without a trace if you have committed at least once. The reflog command (reference log) keeps a history of all HEAD movements for the past several weeks.