Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by NaFM · Jun 30, 2016 at 06:37 AM · gitmergeversion-controlperforcemerging

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!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

59 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UnityYAMLMerge Error - Found unexpected end of stream 1 Answer

How to properly set up YAMLMerge and a merge tool on windows 1 Answer

*Unknown error occurred while loading* main scene file 1 Answer

problems with merge conflicts for unity projects 1 Answer

Unity Perforce Integration Host Error 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges