简体   繁体   English

有没有一个很好的方法来使用git重新定义和合并project.pbxproj文件?

[英]Is there a good way to rebase and merge the project.pbxproj file using git?

I have a very annoying issue when rebase the xcodeproj files, is there any way to solve this? 在修改xcodeproj文件时,我有一个非常烦人的问题,有什么方法可以解决这个问题吗?

The situation is like this: 情况是这样的:

(1) A changed the project.pbxproj of demo.xcodeproj, and commit 1; (1)更改了demo.xcodeproj的project.pbxproj,并提交1;

(2) B changed the project.pbxproj of demo.xcodeproj, and commit 2; (2)B改变了demo.xcodeproj的project.pbxproj,并提交了2;

(3)when B rebase the commit 2 to commit 1 , there gonna be lots of conflicts, and it's impossible to merge. (3)当B将提交2改为提交1时,会发生很多冲突,并且不可能合并。

(4) So B have to commit again. (4)所以B必须再犯。

I know the project.pbxproj is an xml file, and the keys in xml are generated randomly. 我知道project.pbxproj是一个xml文件,xml中的键是随机生成的。

My question is : 我的问题是:

Is there any way to solve this problem? 有什么方法可以解决这个问题吗? I have no clue about this. 我对此毫无头绪。

It seems that in fact demo.xcodeproj is a folder , and like every system-dependant configuration file/folder, people tend to avoid versioning them, because they always create conflicts when updating. 似乎demo.xcodeproj实际上是一个文件夹 ,并且像每个依赖于系统的配置文件/文件夹一样,人们往往会避免对它们进行版本控制,因为它们在更新时总是会产生冲突。

Anyway, this question has already been addressed here: xcodeproj under version control 无论如何,这个问题已经在这里得到解决: 版本控制下的xcodeproj

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

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