tags:

views:

60

answers:

1

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?

+2  A: 

http://stackoverflow.com/questions/134882/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.

Dietrich Epp
Thanks. This worked.
Schitti