xcode 如何解决Xcode中project.pbxproj使用git的冲突?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37407969/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to solve conflicts about project.pbxproj in Xcode use git?
提问by iforvert
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
文件有冲突,如何通过其他最佳方式解决?
回答by Ana Llera
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 Kinand it works like a charm.It will parse your project configuration file and detect errors.
您可以使用语法检查器来验证
project.pbxproj
文件,我使用Kin并且它的工作原理非常棒。它将解析您的项目配置文件并检测错误。
For Example (Using KIN)
例如(使用 KIN)
If your project file gets corrupted you can be left with something like this:
如果您的项目文件被损坏,您可能会留下这样的东西:
And if your diffson the file are far too much.. it can be quite challenging to find the error...now, after using KINyou can go from problemto solutionin no time.
如果你的diff文件上的文件是太多..它可以是相当具有挑战性的查找错误......现在,使用后,KIN你可以去的问题,以解决在没有时间。