xCode "discard all changes" removed files - need help

Hello,

I had *.png files (as binary data) in my xCode project. I don't need those files anymore so I removed them locally.


In the meantime I created new files (*.cpp, *.h and other *.png). And after all I tried to commit project. But there was old files marked with "!".


So I went to Github repository through website and removed those files by my own.


Then when I tried to commit project from xCode, the removed files was still marked with "!". But I decide to uncheck them and commit.


But then I get error that my repository locally is out of date, but mark "M" from all files (M - means files to commit) disappeared. But on github website there was still old files.


So I tried various things, and suddenly I clicked in xCode "discard all changes" (but please notice there was no "M" mark, just "?" mark on new files), and all those new files disappeared from my project, from finder, from anywhere.


I lost whole day work. Is there any way to recovery those files? I didn't make any backups during day. But did those files really disappear permanently? Isn't there any "trash" or "temp" folder for such files?


I tried to checkout repository from commit history, but it doesn't help. The file is still in red colour in the browser, and doesn't exist anywhere on the drive.

Replies

When you also lose files and see post which "Posted 4 years ago" with zero comments on it... sad.

> When you also lose files and see post which "Posted 4 years ago" with zero comments on it... sad.

Yes, it’s sad. But there are other threads about recovering lost files, including this recent one:

https://developer.apple.com/forums/thread/725966