It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

0 votes
Manju Atlassian Team Jul 25, 2017

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
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,970 views 0 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you