tiw
tiw

Reputation: 565

How to get back to an older version of my project Xcode 10

I have a very old project I was working on to revive it. I deleted some infoplist.strings files first, then by mistake the storyboard file. So Xcode 10 started complaining. I thought maybe I can get my deleted files back if I press Source Control -> Discard all changes. And then I lost the whole project, code and everything. All the files in the project are gone. So please tell me there is a way to get back my files. PS: I did close the project that went wrong. And opened it again, then there was thus, the basic files a simple project starts with.

Upvotes: 0

Views: 2056

Answers (1)

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

You can go back to the last commit before you discarded the changes by using Xcode's source control navigator. Select the current branch from the source control navigator to see all the commits for that branch.

Select the commit you want to go back to, right-click, and choose Branch from. A sheet opens. Enter a name for the branch and click the Create button. Now you're back to the older version of the project.

Upvotes: 1

Related Questions