0

I searched as much as I could, but I couldn't find any answers. Right now I am panicking that I've lost everything.

I'm working on a project for a php web app, I created some files and then accidentally clicked checkout in soucetree on an earlier revision. Is there any way to recover the previous version (I did commit before the checkout) or is it gone?

Zoe
  • 27,060
  • 21
  • 118
  • 148
danredda
  • 17
  • 1
  • Did you push the commit before you checked out? – Bernardo Meurer Sep 25 '15 at 02:44
  • No. I was unable to push due to an error. The error message said something about checkout and then copy the files across, so I checked out and then my files were gone. Noob @ Sourcetree here (And repositories in general) – danredda Sep 25 '15 at 02:45
  • 1
    If you have commited then there is nothing at all to worry about. Do a git log, find the hash for the commit that you want and do git checkout hashcode – e4c5 Sep 25 '15 at 02:50

0 Answers0