如何在Xcode中还原以前的代码版本 [英] How to restore previous version of code in Xcode

查看:436
本文介绍了如何在Xcode中还原以前的代码版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Xcode中开发一个Objective C项目,需要还原到在源代码管理中提交的先前版本。我怎么做?我可以找到有关如何提交和推送的信息,但是找不到有关如何还原到旧版本的信息。

I'm working on an Objective C project in Xcode and need to restore to a previous version that was committed in source control. How do I do that? I can find information on how to commit and push but no information on how to restore to an old version.

推荐答案

您无法还原使用Xcode一次完成整个项目,但是您可以在终端上完成;只需将CD插入项目的文件夹,然后键入git log即可找到您要查找的哈希,然后执行git checkout [ hash ]。

You cannot revert the entire project at once in Xcode, but you could do it from the terminal; just cd into the folder of your project and type git log to find the hash you're looking for, then do git checkout [hash].

这篇关于如何在Xcode中还原以前的代码版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆