5

I miscalculate the commit sequence, and things gone.

Is there any other way to get things back?

Thanks.

Robin
  • 61
  • 3
  • use "git reflog" yo will see many lines like this: 1f5bd18 HEAD@{1}: commit: work finished Then use "git reset --hard 1f5bd18" (see that 1f5bd18 string is the id of the commit that you want to revert to) – Fernando García Corrochano Aug 09 '16 at 08:03

1 Answers1

9

git reflog and git fsck are your weapons of choice to rediscover the missing commits and branch them.

TheBuzzSaw
  • 8,648
  • 5
  • 39
  • 58