Reflog

Reflog

Git Reflog

The git reflog command shows us all the actions that have been taken on our repository. Everyone will make mistake and if you make a mistake, you can simply undo that change by resetting your HEAD based on the information (commit-id) that reflog provides to us.

git reflog
git reset --hard <commit-id>

reflog