Unity smart merge + GIT on MAC OSX
Hello,
We are a small team starting on a new project. Before we start I wanted to see if working with unity and GIT is possible/easy.
I found the manual on unity smartmerge and gave it a try.
This is my git config file:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = '/Applications/Unity/Unity.app/Contents/Tools/UnityYAMLMerge' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
And this is my mergespecfile
#
# UnityYAMLMerge fallback file
#
# Modify the next two lines if scene or prefab files should fallback
# on other that the default fallbacks listed below.
#
# %l is replaced with the path of you local version
# %r is replaced with the path of the incoming remote version
# %b is replaced with the common base version
# %d is replaced with a path where the result should be written to
# On Windows %programs% is replaced with "C:\Program Files" and "C:\Program Files (x86)" there by resulting in two entries to try out
# On OSX %programs% is replaced with "/Applications" and "$HOME/Applications" thereby resulting in two entries to try out
unity use '%programs%/p4merge.app/Contents/MacOS/p4merge’ "%l" "%r" "%b" "%d"
prefab use '%programs%//p4merge.app/Contents/MacOS/p4merge’ "%l" "%r" "%b" "%d"
#
# Default fallbacks for unknown files. First tool found is used.
#
# Apple File Merge
* use "/usr/bin/opendiff" %r %l -ancestor %b -merge %d
# Beyond Compare
* use "%programs%\Beyond Compare 4\bcomp.exe" "%r" "%l" "%b" "%d"
* use "%programs%\Beyond Compare 3\bcomp.exe" "%r" "%l" "%b" "%d"
* use "%programs%/Beyond Compare.app/Contents/MacOS/bcomp" "%r" "%l" "%b" "%d"
* use "/usr/bin/bcompare" "%r" "%l" "%b" "%d"
# Araxis Merge
* use "%programs%\Araxis\Araxis Merge\compare.exe" /3 /a2 /wait /title1:"Other" /title2:"Base" /title3:"Local" "%l" "%b" "%r" "%d"
* use "%programs%/Araxis Merge.app/Contents/Utilities/compare" -3 -a2 -wait -title1:"Other" -title2:"Base" -title3:"Local" "%l" "%b" "%r" "%d"
# Perforce merge
* use "%programs%\Perforce\p4merge.exe" "%b" "%l" "%r" "%d"
* use "%programs%/p4merge.app/Contents/Resources/launchp4merge" "%b" "%l" "%r" "%d"
# PlasticSCM merge
* use "%programs%\PlasticSCM5\client\mergetool.exe" -b=%b -s=%l -d=%r -r=%d
* use "%programs%\PlasticSCM4\client\mergetool.exe" -b=%b -s=%l -d=%r -r=%d
* use "%programs%/PlasticSCM/client/mergetool" -b=%b -s=%l -d=%r -r=%d
* use "/opt/plasticscm/client/mergetool" -b=%b -s=%l -d=%r -r=%d
* use "/opt/plasticscm4/client/mergetool" -b=%b -s=%l -d=%r -r=%d
# SourceGear DiffMerge
* use "%programs%\SourceGear\DiffMerge\DiffMerge.exe" --nosplash -m -t1="Incoming Changes" -t2="Base" -t3="Working Copy" -r="%d" "%l" "%b" "%r"
* use "%programs%\SourceGear\Common\DiffMerge\sgdm.exe" --nosplash -m -t1="Incoming Changes" -t2="Base" -t3="Working Copy" -r="%d" "%l" "%b" "%r"
* use "%programs%/DiffMerge.app/Contents/MacOS/DiffMerge" --nosplash -m -t1="Incoming Changes" -t2="Base" -t3="Working Copy" -r="%d" "%l" "%b" "%r"
* use "%programs%/Utilities/DiffMerge.app/Contents/MacOS/DiffMerge" --nosplash -m -t1="Incoming Changes" -t2="Base" -t3="Working Copy" -r="%d" "%l" "%b" "%r"
I Read that I need to Setup a fallback mergetool in this mergespecfile, so I downloaded p4merge.
I setup a test project and made a commit. I made a feature branch, made some changes to the scene and made a commit. I switched back to the master branch, made some changes on the same object in the same scene. Made a commit. Tried to merge the feature branch into the master branch. Got a merge conflict. Ran git mergetool, but then it just openen File Merge as if I hadn't set up smart merge and p4merge as fallback.
TL;DR
Can someone perhaps guide me step by step through the process of setting up smart merge for mac + GIT + p4merge as fallback? I'm using unity 5.3.5f1 Personal edition, so I can't set up the fallback tool via the editor preferences. I did however set the force text and visible meta file preferences
Thanks!