Last Updated: February 25, 2016
·
531
· klj613

Recover from accidental git reset

Simply git reset HEAD@{1}

If you did a hard reset then git reset HEAD@{1} --hard

If you did a soft reset then git reset HEAD@{1} --soft

etc..

Note

If you did a hard reset then you cannot recover un-commited changes which you originally had (unless you stash frequently for backups).