简体   繁体   English

如何回到我的项目Xcode 10的旧版本

[英]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. 我先删除了一些infoplist.strings文件,然后错误地删除了故事板文件。 So Xcode 10 started complaining. 因此Xcode 10开始抱怨。 I thought maybe I can get my deleted files back if I press Source Control -> Discard all changes. 我想如果按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. PS:我确实关闭了出错的项目。 And opened it again, then there was thus, the basic files a simple project starts with. 再次打开它,然后有了一个简单项目的基础文件。

You can go back to the last commit before you discarded the changes by using Xcode's source control navigator. 您可以使用Xcode的源代码管理导航器返回上一次提交,然后再放弃更改。 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. 现在,您回到了项目的旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获得较旧的Xcode测试版? - How to get to older Xcode beta version? 为什么Xcode在iOS Simulator和Device上都运行项目的旧版本? - Why Xcode runs the older version of my project both on iOS Simulator and the Device? 在旧版本的 Xcode 上开发并在 Xcode 12.5 上重新打开的项目中出现构建错误? - Build error in project developed on older version of Xcode and reopened on Xcode 12.5? 我是否需要使用Mac App Store上可用的最新Xcode版本来构建项目以进行提交,还是可以使用旧版本? - Do I need to build my project with the latest available version of Xcode available on the Mac App Store for submission or can I use the older version Xcode/Simulator:如何运行较旧的 iOS 版本? - Xcode/Simulator: How to run older iOS version? 在运行旧版本的计算机上模拟xcode项目时出错 - Error when simulating xcode project on a computer running an older version Xcode不断将我的核心数据模型还原为旧版本 - Xcode keeps reverting my Core Data model to an older version 无法在Xcode 10模拟器中构建我的项目 - Not able to build my project in simulator, Xcode 10 运行较旧的iOS版本XCode - Run older iOS version XCode 如何在9以上的xCode版本上测试iOS 11的应用程序 - How to test apps for iOS 11 on an older xCode version than 9
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM