为什么 .pbxproj 文件在版本控制系统中被视为二进制文件?

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

很少有地方提到 .pbxproj 文件应该 committed/imported 作为 cvs 中的二进制文件或 git。它看起来像文本格式的脚本文件。该建议应将其视为二进制文件的原因是什么?

作为 mentioned here,pbxproj 并不是真正可合并的,它是一个复杂的 属性 列表,管理为 JSON。

通常的设置在 .gitattributes:

*.pbxproj -crlf -diff -merge

作为explained here:

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

另一种方法是:

*.pbxproj binary merge=union

作为 documented here,这不是很好。

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.