简体   繁体   English

git/svn 如何处理 project.pbxproj 冲突?

[英]how git/svn handle project.pbxproj conflict?

When A and B change the project's structure at the same time,the project.pbxproj will conclict in git/svn.当A和B同时改变项目结构时,git/svn中的project.pbxproj会发生冲突。 this file can't be treated as text file, how could I solve this conflict?该文件不能被视为文本文件,我该如何解决这个冲突? Now, I have to override one's project.pbxproj and manually apply another's structure.现在,我必须覆盖一个人的 project.pbxproj 并手动应用另一个人的结构。 Any sugguest?有什么建议吗? thx谢谢

It can be treated as a text file.可以被视为一个文本文件。 It's ugly, but you can usually figure out what the various lines of text in there are doing, and merge with some elbow grease.这很难看,但您通常可以弄清楚其中的各种文本行在做什么,并与一些肘部油脂合并。

Just open the project file in your favorite text editor (even in Xcode).只需在您喜欢的文本编辑器(甚至在 Xcode 中)中打开项目文件。 The project file structure isn't totally transparent, but it's actually quite human-editable, and in all but the most exceptional circumstances, the conflicts are generally very easy to resolve.项目文件结构不是完全透明的,但它实际上是可以人工编辑的,而且除了最特殊的情况外,冲突通常很容易解决。

If you are using Git, just add a.gitattributes file and add one line:如果你使用的是Git,只需添加一个.gitattributes文件并添加一行:

*.pbxproj binary

This line will tell Git to treat all pbxproj files as binary data.此行将告诉 Git 将所有 pbxproj 文件视为二进制数据。

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

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