how to back after git reset --hard HEAD^1 code example Example: git reset --hard one step git reset --hard HEAD~1