Helen Wood
Helen Wood

Reputation: 1882

Merge conflicts with project.pbxproj on Git - Xcode iOS

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.

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.

Say,

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

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

Thank you all very much.

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

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

Upvotes: 10

Views: 8762

Answers (3)

byohay
byohay

Reputation: 282

I'm one of the maintainers of Kintsugi, a tool that intelligently merges the conflicts and promises to automatically solve 99.9% of the conflicts that occur in project.pbxproj files.

The readme also contains instructions on how to set it up as Git merge driver, so it will be applied automatically whenever a conflict in a *.pbxproj file occurs. I don't know of a way to do that from Sourcetree, but for most conflicts after setup you won't have to touch the command line again.

Upvotes: 1

sktree
sktree

Reputation: 101

  1. New files are created by only one developer on "main-develop" branch.
  2. Push new files to "main-develop"
  3. Those files are implemented by other developers after pull

Upvotes: 3

Josh Brown
Josh Brown

Reputation: 53073

Create a .gitattributes file and adding the following line:

*.pbxproj merge=union

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

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

Upvotes: 10

Related Questions