6

I have a local branch work, where I created two new files a.py, b.py and committed them.

Then, instead of doing "git rebase origin/master", I accidently typed "git rebase origin master", and now the commit I did is gone and the files are gone. Does anyone know how I can recover my files?

Schitti
  • 25,489
  • 8
  • 24
  • 21

1 Answers1

7

Undoing a git rebase

Git keeps the old refs (until you clean them up). You can switch back to the old refs from before the rebase just fine.

Community
  • 1
  • 1
Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415