故事板在合并期间损坏
在 Xcode 中,我们拉取了其他人的推送并与本地副本合并。然而现在拉出的副本已经损坏了故事板。最糟糕的是我们不小心将这些损坏的文件推送到远程仓库。现在我有什么办法可以解决这个问题吗?
我们使用 SourceTree 作为 Git 的接口。
我们的一位成员拥有最后一个工作副本,因为我们尚未将任何损坏的数据从服务器提取到他的副本。
对于这种情况有什么潜在的解决方案吗?谢谢
In Xcode we pulled someone else's push and merged with local copy. However now the pulled copy has corrupted storyboard. The worst thing is we accidentally pushed those corrupted file to remote repo. Now is there any way I can solve this issue?
we are using SourceTree as our interface to Git.
One of our member has the last working copy as we haven't pulled any corrupted data from server to his copy.
Any potential solution for this situation? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
抱歉,我不是一个足够的 Git 专家,无法为您提供确切的命令,但是您可以输入 git 命令来将文件恢复到特定的修订/提交。如果您在网络上搜索,您应该能够找到它们并恢复文件。
您可能必须使用命令行 Git。
这可能有助于重置或使用 Git 将特定文件恢复为特定修订版?
以及这个 使用 Git 将文件回滚到更早的版本
Sorry but I'm not enough of a Git expert be be able to give you the exact commands, but there are git commands you can enter to revert a file to a specific revision/commit. If you hunt around the web you should be able to find them and revert the file.
You may have to use command line Git.
This may help Reset or revert a specific file to a specific revision using Git?
and this Rollback file to much earlier version using Git
拉取和合并会像任何其他更改一样提交到历史记录中,因此您只需撤消该提交即可。用于删除最后一次提交并将工作树恢复到先前提交的 git 命令是:(
来自 从 Git 中的分支删除提交)
然后可以将此更改推送回您的服务器。
A pull and merge is commited to the history like any other change so you just need to undo that commit. The git command to delete the last commit and restore your working tree to the previous commit is:
(from Delete commits from a branch in Git)
This change could then be pushed back up to your server.