Вопрос

In XCode 4 when I was deleting some images I had .m selected as well and oops... it's gone. I has a lot of work done for today. How can I recover? Please help. I did not use Time Machine backup recently and did not back it up somehow else. I need that one copy badly. Anything to try?

Это было полезно?

Решение

First, you should always make sure the option to create a Git repo is turned on when you create a new project in Xcode. Then you should commit often, like every time you add a feature or fix a bug (maybe more often than that is there is a lot of code being written). That way you can just discard you changes and get back anything you lose.

FOr now recovering the file depends on weather you told Xcode to move the file to the trash or not when deleting and weather or not you have emptied the trash since then. If it is in the project folder or trash just re-add the file if not you need to find a file recovery app and hope the file space hasn't been overwritten yet.

Другие советы

I learnt the hard way that XCode 4 deletes files instead of moving them to the trash! Disaster is just one click away.

Obviously Time Machine or version control will not help recover recent changes.

Type "undelete files on the mac" on a search engine. I managed to recover most of my data using such a piece of software.

If you did not empty the trash since you deleted the file move the file from the trash back into your project and re-add to the project if necessary.

In the future at least use the snapshot feature of Xcode.

Better still use the build-in Git version control.

Get a drive and use Time Machine, it protects against this kind of inadvertent deletion, it has saved me many times in a way my RAID drive won't.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top