git reflog

Category: Git - Advanced

git reflog

Show a log of all HEAD movements including resets and rebases

Shows a log of every place HEAD has pointed — including resets and rebases. Invaluable for recovering 'lost' commits.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.