3

Possible Duplicate:
Undoing a git reset --hard HEAD~1

I used the command line:

git reset --hard HEAD^

how can i redo it ?

Community
  • 1
  • 1
Ramin Mousavi
  • 406
  • 1
  • 5
  • 19

1 Answers1

9

If you want to go back to HEAD ( the previous ) you can do:

git reset --hard HEAD@{1}

Note that working directory changes and staged changes are lost after you do git reset --hard and you cannot get them back.

sehe
  • 350,152
  • 45
  • 431
  • 590
manojlds
  • 275,671
  • 58
  • 453
  • 409