在Git-Xcode iOS上与project.pbxproj合并冲突 [英] Merge conflicts with project.pbxproj on Git - Xcode iOS

查看:1162
本文介绍了在Git-Xcode iOS上与project.pbxproj合并冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我已经在这里阅读了类似的评论,但是在这个论坛中,我还没有找到一种可以无缝方式适合团队合作的方法。

Although I already read similar comments here, in this forum, I haven't found an approach that may be suitable for teamwork in a seamless way.

如果你知道我的意思,你可能已经发现使用git和Xcode中的 project.pbxproj 文件很棘手,即使你在不同的文件中工作。

If you know what I mean, you already may found tricky working with git and the project.pbxproj file in Xcode, even when you are working in a different file.

说,


  • 开发人员:创建了Foo文件夹,将foo.swift添加到项目中。

  • B开发人员:创建了Bar文件夹,将bar.swift添加到项目中。

不同的路径......但是你知道,冲突!正如您可能还注意到的那样,离开 project.pbxproj out不是一个选项。

Different paths... but you know, conflict! And as you may also noticed, leaving project.pbxproj out is not an option.

所以我的问题是:你如何以专业的方式处理这个问题,Git流程就绪并且最简单。

So my question is: How do you handle this in a professional manner, Git flow ready and easiest way.

非常感谢你们。

PS:我现在正在使用Bitbucket和SourceTree。

PS: I'm using currently Bitbucket and SourceTree if matters.

PS2:如果可能的话,我想避免使用命令行和手动编辑文件。

PS2: I'd like to avoid command line and manually file editing if possible.

推荐答案

创建 .gitattributes 文件并添加以下行:

Create a .gitattributes file and adding the following line:

*。pbxproj merge = union

合并将自动发生无需触摸任何东西。

Merges will happen automatically and without you having to touch anything.

或者,您可以尝试 mergepbx ,它进行更智能的合并。

Alternatively, you might try mergepbx, which does a more intelligent merge.

这篇关于在Git-Xcode iOS上与project.pbxproj合并冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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