如果是php、rails项目,用git merge后解决每个文件的冲突就好了。
如果git merge cocoa项目,工程文件经常会有冲突。而且一冲突就一大堆。怎么破?不会要为每个项目成员开一个工程文件吧,有木有科学点的解决方案
PHP中文网2017-04-22 09:02:14
Most of the .pbxproj project file conflicts we encounter are that several people have added files to the project at the same time. This is an XML file, so basically all the modifications made to this file by all parties are added together. You can ask git to do this by adding a line to the .gitattributes file:
*.pbxproj text -crlf -diff -merge=union
This can handle most situations, unless someone deletes a file, someone adds a file with the same name, or everyone modifies some compilation options at the same time, but this situation should be avoided through the system.
In addition, it is said that some iOS development teams at Google do not submit .pbxproj files. Instead, they define a file format to record the file list, and then use an internal script to generate .pbxproj.