Xcode 10情节提要和info.plist git diff无法正确显示 [英] Xcode 10 storyboard and info.plist git diff is not properly showing

查看:107
本文介绍了Xcode 10情节提要和info.plist git diff无法正确显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Xcode 10遇到了一个奇怪的问题.每当我在storyboardplist上发生冲突时,Xcode都不会向我显示解决冲突的正确方法.请参阅屏幕截图,该屏幕截图是storyboard案例的示例.如果我在plist文件上遇到冲突,那么我什至无法打开它(Xcode说该文件格式不正确).现在正在使用Xcode 9.4来解决此问题.有没有办法在Xcode 10中修复它.预先感谢.

Am facing a strange issue on my Xcode 10. Whenever I get conflict on storyboard or plist, Xcode does not showing me the proper way to resolve conflicts. See the screenshot which is an example of storyboard case. If I get the conflict on plist file, then I can't even open it (Xcode saying the file is not proper format). Right now am using Xcode 9.4 to resolve this issue. Is there a way to fix it in Xcode 10. Thanks in advance.

推荐答案

如果我在plist文件上遇到冲突,那么我什至无法打开它(Xcode表示文件格式不正确)

If I get the conflict on plist file, then I can't even open it (Xcode saying the file is not proper format)

当然不能.一旦发生冲突,并将git标记文本插入文件中,该文件就不会以正确的格式 不再是纯XML plist文件.

Of course you can’t. Once the conflict has occurred, and the git marker text is inserted into the file, the file is not in the proper format — it is no longer a pure XML plist file.

在Xcode中查看文本的通常方法是在导航器中按住鼠标右键单击情节提要或plist文件,然后选择打开方式">源代码".

The usual way to see the text within Xcode is to control-click on the storyboard or plist file in the navigator and choose Open As > Source Code.

但是,我个人所做的是使用BBEdit打开文件.无论哪种方式,您现在都在看带有git标记的文本.

What I personally do, however, is to open the file using BBEdit. Either way, you are now looking at the text with the git markers in it.

现在只需直接编辑文本,即可解决冲突并消除标记以恢复顺序.现在,将合并标记为已解决,然后提交.

Now just edit the text directly, resolving the conflict and eliminating the markers to restore order. Now mark the merge as resolved and commit.

例如,在上面的示例中,我们有以下文本:

For example, in the above example we have this text:

<<<<<<< HEAD
    <string>3</string>
=======
    <string>2</string>
>>>>>>> branch

因此,我们将删除<<<行,===行,>>>行以及其余两行中的 one .现在我们可以将冲突标记为已解决,提交并继续.

So we would delete the <<< line, the === line, the >>> line, and one of the remaining two lines. Now we can mark the conflict as resolved, commit, and proceed.

可以在Xcode比较视图中查看和比较冲突的版本:

It is possible to view and compare the conflicting versions in the Xcode comparison view:

但是我认为这样做不会给您带来任何好处.

But I don’t think it brings you any advantage to do so.

这篇关于Xcode 10情节提要和info.plist git diff无法正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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