Can/Does SourceTree use local git config for Merge and Diff tool settings? Edited

It seems that setting a custom tool for either merging or diffing is always set within git's global config area.

Due to the needs of our team, I require explicit control of the merge workflow for all team members, and need to automate the settings of custom diff tools.  (aka Unity & UnityYAMLMerge).

Example config items:

mergetool.sourcetree.cmd=/Applications/Unity_5_5_3/Unity.app/Contents/Tools/UnityYAMLMerge merge -p $BASE $REMOTE $LOCAL $MERGED
mergetool.sourcetree.trustexitcode=true
difftool.sourcetree.cmd=/Applications/Unity_5_5_3/Unity.app/Contents/Tools/UnityYAMLMerge merge -p $BASE $REMOTE $LOCAL $MERGED
difftool.sourcetree.path=

 

Ideally, I would like to have my team's local git config set to control these behaviors... allowing explict workflows per repo.

Am I missing something, or does SourceTree only utilize the global config in this respect?

 

Secondly...

It seems that manually editing the global config settings for SourceTree's custom Diff and Merge tools seem to be overwritten when relaunching the application.  This removes any chance of automation, and requires each team member to enter custom tool paths/variables manually.


It seems that SourceTree does not reference `~/.gitconfig` on launch, but overwrites it on launch (I'm guessing from a separate, SourceTree-specific preferences file).  This is NOT ideal.

 

Any help would be appreciated :)


(SourceTree 2.5.1 MacOS)

 

 

1 answer

Hi @Eriks Vitolins

To answer your questions, 

1. does SourceTree only utilize the global config in this respect?

Yes, SourceTree uses the global config only and not local config per repo for diff and merge tool.

 

2. Does SourceTree reference global config on launch?

Though we write the settings from SourceTree to gitconfig, we are not reading from it right now. Feel free to submit a bug for this on jira.atlassian.com

However, we write these info to defaults and I can share the relevant keys with you if required. Before that, I would recommend you to try setting "custom" diff / merge tool in preferences and the commands with the args and let me know if that works.  

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #2: Let’s talk severity levels

Welcome to your weekly Jira Ops Early access program update, where we’re sharing news and updates on Jira Ops' progress as we work toward our 1.0 release. If you ever want to drop us feedback or idea...

25 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you