Showing posts with label recover git reset head. Show all posts
Showing posts with label recover git reset head. Show all posts

Saturday, 24 March 2018

Recover from Git Hard Reset

Hey Guys,

Today we talk about how to recover  from git reset head command.

Sometimes we do git reset HEAD~  to move the pointer to previous commit . 

If we again we want to come back to latest commit or other commits

Do the below

git reflog show    ## display all the commits log with HEAD

git reset HEAD@{1}     ## reset to selected HEAD from above list