0

I lost all of my work after I did git reset, and I want to undo my reset HEAD things.

Here is my log:

c2415f9 (HEAD -> master) HEAD@{0}: reset: moving to HEAD@{4}

c2415f9 (HEAD -> master) HEAD@{1}: reset: moving to HEAD@{1}

efc857e HEAD@{2}: reset: moving to HEAD~9

c2415f9 (HEAD -> master) HEAD@{3}: reset: moving to HEAD~1

ee49352 HEAD@{4}: commit: update design

c2415f9 (HEAD -> master) HEAD@{5}: commit (merge): design update

bd7b690 HEAD@{6}: commit: design update2

dbcdb7c HEAD@{7}: commit: design update

c376c79 HEAD@{8}: reset: moving to HEAD^

1f0e877 HEAD@{9}: reset: moving to HEAD^

a801027 HEAD@{10}: commit: design update

1f0e877 HEAD@{11}: reset: moving to HEAD~1

7b298f1 HEAD@{12}: commit (amend): design update

f25ac06 HEAD@{13}: commit: design update

1f0e877 HEAD@{14}: commit (merge): temp4

c376c79 HEAD@{15}: commit: UI and icon updated

5116b62 HEAD@{16}: commit: error changes

d642af7 HEAD@{17}: commit (merge): menifast

b4785c0 HEAD@{18}: commit: xml

6fb07e9 HEAD@{19}: reset: moving to HEAD

6fb07e9 HEAD@{20}: checkout: moving from temp to master

a5649d7 (origin/temp, temp) HEAD@{21}: reset: moving to HEAD

I want to go back to Head{5}, I just want to undo all the reset things! Help me guys!

Book Of Zeus
  • 49,509
  • 18
  • 174
  • 171

1 Answers1

0

Get the identifier of your commit. Then use:

git reset <commit-retrieved-using-reflog>

So, for you it's :

git reset HEAD@{5}