The project.pbxproj contains all of the metadata about your project that Xcode uses to build it; the settings, the file references, configuration, targeted platforms, etc...
I.e. it is a critically important.
There really isn't a great answer for this. Typically, teams will avoid conflict by limiting edits to the project to one team member at a time.
The Xcode team has put a lot of effort into making the file merge-friendly. In managing several large projects via svn, I've generally found that the merges are automatic and painless.
Until they aren't. And when they aren't, revert, merge changes by hand (i.e. make the changes in the project that conflicted), and move on.
..
..
总结就是 xcode在往好的地方发展,如果通过xcode的git,那么xcode会努力处理好,merge
第二个就是,对于加入新资源,添加引用之类的事情,要限制在一个人手里..
...更有好事者,写了脚本来处理:::
1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/sh
projectfile
=
`find -d . -name
'project.pbxproj'
`
projectdir
=
`
echo *.xcodeproj
`
projectfile
=
"${projectdir}/project.pbxproj"
tempfile
=
"${projectdir}/project.pbxproj.out"
savefile
=
"${projectdir}/project.pbxproj.mergesave"
cat
$projectfile | grep -v
"<<<<<<< HEAD" | grep -v
"=======" | grep -v
"^>>>>>>> " >
$tempfile
cp
$projectfile
$savefile
mv
$tempfile
$projectfile
|
...
...
1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/sh
projectfile
=
`find -d . -name
'project.pbxproj'
`
projectdir
=
`
echo *.xcodeproj
`
projectfile
=
"${projectdir}/project.pbxproj"
tempfile
=
"${projectdir}/project.pbxproj.out"
savefile
=
"${projectdir}/project.pbxproj.mergesave"
cat
$projectfile | grep -v
"<<<<<<< HEAD" | grep -v
"=======" | grep -v
"^>>>>>>> " >
$tempfile
cp
$projectfile
$savefile
mv
$tempfile
$projectfile
|