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
  • 486
  • 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
  • 374,641
  • 47
  • 450
  • 633
manojlds
  • 290,304
  • 63
  • 469
  • 417