6

So I made a huge school boy error, and I did not back up the Xcode Project to an external drive.

The Xcode project was 6-9 months of work and was supposed to be released in a couple weeks.

I have never used Git/Github and was going through a treehouse course so I could set up a work flow for the project. (Yeah I am new to development).

So I got to the point where I created a repo on Github but hadn't committed the project to the repo. I went to commit locally but got an error, and I accidentally clicked discard All Changes. I have since lost my app and all the files.

I went to the trash and saw a folder which seems to have all the files, however I dragged the folder to the desktop and opened the project and the project is empty.

Can anyone please help how I can restore my project ?

PS: I have an idea to restore my last backup on time machine, and replace the project from my last backup with the one restored from the trash bin. But I don't know if that will work. The last backup was a month ago, and yeah I have done a lot of changes since.

Shobhakar Tiwari
  • 7,862
  • 4
  • 36
  • 71
A.Roe
  • 973
  • 3
  • 15
  • 34
  • If you've never committed I think you're out of luck [see this](http://stackoverflow.com/questions/25308554/how-to-undo-xcode-discard-all-changes-if-not-committed). Maybe there is a way but I'm not sure. If you have a backup at least you only lost a month's worth instead of everything. – AJ B Sep 02 '16 at 18:45
  • My app was moved to the trash, it actually has all the files and code. Even says the last save was today on the files; just before setting up a git workflow. So it can't be completely lost can it, it's just when I open the project it shows nothing even though there are files within the app project folders. – A.Roe Sep 02 '16 at 18:48
  • Hmm sounds similar to [this](http://stackoverflow.com/a/33426013/3409505) – AJ B Sep 02 '16 at 18:54
  • I have a backup from over a month ago. So I could manually copy the files into my project (which is a long and time consuming task), but what is it about the project in the trash which doesn't allow me to see the project for how it was; even though all the files are there. Is there something I can correct within the package contents – A.Roe Sep 02 '16 at 19:14
  • Use Time Machine as a last resort fallback for situations like this in the future. – Thorbjørn Ravn Andersen Jan 06 '19 at 03:51

0 Answers0