Reputation: 2685
For example, Apple's Interface Builder file format (xib
) is, for all practical purposes, impossible to merge. However, because it's a text format, git will happily try to merge files of this type, and this will almost certainly result in corruption if git "succeeds".
Can git be configured to always fail to merge xib
files, as it would for binary formats?
Upvotes: 15
Views: 1598
Reputation: 782
Yes. There is a great file called .gitattributes
, which allows you to set individual properties for files in your git project. For your purposes, you would fill your .gitattributes
with this line
*.xib -crlf -diff
This turns off line-feed correction and disables diff on this file. You can read a little more here or here
Upvotes: 11