How to merge Unity branches¶
Setup¶
Install Sourcetree
Click on
Data > Clone / NewClone your project
Add your Github account
Click on
Tools > Options > DiffChange
Merge-TooltoCustomAdd
C:\unity\2021.3.1f1\Editor\Data\Tools\UnityYAMLMerge.exe(you may search this .exe on your PC) toMerge-CommandAdd
merge -p $BASE $REMOTE $LOCAL $MERGEDtoArgumentsDownload TortoiseGit
Add path of TortoiseGit to
C:\unity\2021.3.1f1\Editor\Data\Tools\mergespecfile.txtlike this* use "%programs%\TortoiseGit\bin\TortoiseGitMerge.exe" -base:"%b" -mine:"%l" -theirs:"%r" -merged:"%d"(at line 21)
Merge branch X to Y¶
Check out
YRight click
XinHistory-viewSelect
Merge...Switch to
Data Status-viewRight click the merge conflicts
Select
Resolve conflicts > Start external merge-tool...Wait (something will happen… eventually… someday…)
When a TortoiseGit-windows pops up fix the conflict manually and press
Resolve conflictIgnore the error and close it and TortoiseGit
Wait
Press
Commitin the bottom left cornerPress
Push