There might be a chance you can view the file's old history. Check out George Marmaridis' answer
Here is what he says:
You might not be out of luck. Although Git can't help you, Finder may be able to come to the rescue!
If you have not turned off the Versions feature (which by default is turned on and you need a Terminal command to disable), then do the following:
- Quit Xcode.
- Open the file you wish to bring back your lost changes to using TextEdit.
- Go to File > Revert To > Browse All Versions...
- Scroll through the available versions. Hopefully you will have many available to choose from.
- Select a version and hit Restore.
- Follow 2-5 for all necessary files.
- Launch Xcode. You should now see the
M
next to these files in Project Navigator indicating they include uncommited changes (the changes you previously discarded).