简体   繁体   English

如何解决关于project.pbxproj在Xcode中使用git的冲突?

[英]How to solve conflicts about project.pbxproj in Xcode use git?

I always solved this problem by using directory structure of the other members shall prevail ,and then confirm don't have any conflicts and mend it to what directory structure I want. 我总是通过使用其他成员的目录结构来解决这个问题,然后确认没有任何冲突并修改它到我想要的目录结构。

So, I want to know, the project.pbxproj file have conflicts, how to solve it through other best way? 所以,我想知道, project.pbxproj文件有冲突,如何通过其他最佳方式解决?

Normally, you simply want to accept both sides of the merge (people added different files) and that's all. 通常,您只想接受合并的两面(人们添加了不同的文件),这就是全部。

After that, if your file is still ' corrupted ', in most cases the problem is due to a wrong format after merge, most common scenarios are: 之后,如果您的文件仍然“ 损坏 ”,在大多数情况下问题是由于合并后格式错误,最常见的情况是:

  • missing a comma 错过逗号
  • duplicated statements 重复的陈述

It's very easy to fix if you know what you are looking. 如果你知道你在寻找什么,这很容易解决。

You can use a syntax checker to verify the project.pbxproj file, I use Kin and it works like a charm. 您可以使用语法检查器来验证project.pbxproj文件, 我使用Kin ,它就像一个魅力。 It will parse your project configuration file and detect errors. 它将解析您的项目配置文件并检测错误。


For Example (Using KIN) 例如(使用KIN)

If your project file gets corrupted you can be left with something like this: 如果你的项目文件被破坏了,可以留下这样的东西:

在此输入图像描述

And if your diffs on the file are far too much.. it can be quite challenging to find the error... now , after using KIN you can go from problem to solution in no time . 如果你对文件的diff是太多了..它是相当有难度查找错误...... 现在 ,使用KIN后,你可以从问题解决方案没有时间

在此输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM