Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why should .pbxproj file be treated as binary in version control systems?

In few places its been mentioned that .pbxproj file should be committed/imported as binary in cvs or git. it looks like script file in text format. what are reasons behind this suggestion that it should be treated as binary?

like image 356
nav1729 Avatar asked Oct 19 '22 10:10

nav1729


1 Answers

As mentioned here, pbxproj is not really mergeable, being a complex property list managed as JSON.

The usual setting is in a .gitattributes:

*.pbxproj -crlf -diff -merge

As explained here:

This prevents Git from trying to fix newlines, show it in diffs, and excludes it from merges.

The other approach is:

*.pbxproj binary merge=union

As documented here, this didn't work well.

The problem was that braces would become out of place on a regular basis, which made the files unreadable. It is true that tho does work most of the time - but fails maybe 1 out of 4 times.

like image 100
VonC Avatar answered Nov 02 '22 22:11

VonC