"Mergetool path issue" when launching external merge tool (OSX)

Bradley Kent August 18, 2021

When I choose "Launch external merge tool" I get

Mergetool path issue

Current path:/Library/Developer/CommandLineTools

Please set the command tool path in Xcode and Try again!

I don't know what this means or how to fix

External diff tool works fine

I have Sourcetree 4.1.3

xcode-select --print-path

displays
/Library/Developer/CommandLineTools

(same path referred to in error message)

 

I tried

sudo rm -rf /Library/Developer/CommandLineTools

 Sourcetree immediately prompted me to instal Xcode.  Which I did.

Still get the error

Reverting to Sourcetree 4.1.2  (or 4.1.1) solved issue

13 answers

1 accepted

10 votes
Answer accepted
mikepearce September 7, 2021

Solved for me by ensuring Command Line Tools were set correctly in Xcode (Preferences->Locations).

For some reason this was not set.

Ryan D LaBarre October 6, 2021

Thank you, this did the trick for me as well.

Like # people like this
erikpallhansen December 6, 2021

@mikepearce Doing this and restarting SourceTree did the trick for me. Thanks!

Like # people like this
Brandon LaCava February 17, 2022

Worked for me, v4.1.5

Like mikepearce likes this
Alexey.Egorov@lampenwelt.de February 23, 2022

So, maybe the issue is coming when Xcode is not installed? I only have the command line tools installed. Downgrade to 4.1.1. worked out for me. I kinda don't want to install Xcode as I don't use it at all.

Like # people like this
mithun.chaubey July 15, 2022

This worked for me on 4.1.8. Unfortunate for people who don't want to install Xcode though :-/

Mahadeb Raj Bangshe March 16, 2023

Awesome! It works for me.

To set up Command Line Tools in Xcode, follow these steps:

  1. Open Xcode on your Mac.
  2. Go to the menu bar and click on "Xcode" and then select "Preferences".
  3. In the preferences window, click on the "Locations" tab.
  4. Look for "Command Line Tools" and click on the drop-down menu next to it.
  5. Select the version of the Command Line Tools that you want to use.
  6. If the version you want is not listed, click on the "Download" button to download and install it.
  7. Once you have selected the Command Line Tools version, close the preferences window.

 

That's it! You have now set up Command Line Tools in Xcode. You can now use the command line tools in Terminal or in Xcode.

Like mikepearce likes this
4 votes
efinkler October 11, 2021

Reverting to 4.1.1 fixed this for me.

Download here: https://www.sourcetreeapp.com/download-archives

Florian Storz November 17, 2021

Reverting to 4.1.2 fixed the problem also on my side.

Like SyedH likes this
Deleted user December 9, 2021

Not being able to launch my KDiff3 merge tool to resolve conflicts is is a big problem for me. Downgrading to 4.1.2 as suggested above fixed it for me.

3 votes
Bradley Kent August 18, 2021
Krishna Murari Jha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 25, 2021

@Bradley Kent  Did you install Xcode? If yes, then could you please check the Xcode tool path using this command "xcode-select --print-path". Also, Could you please share the system information?

Hussam Radwan August 31, 2021

same problem occurred for me using sourcetree version 4.1.3 (239)

for command "xcode-select --print-path"
printed "/Library/Developer/CommandLineTools"

system information "uname -a"

Darwin xxxxx.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64

note: trying to use Kdiff3

Like # people like this
1 vote
ActuallyAdasi October 26, 2022

This is a bug, here is the ticket, as pointed out in other answers: https://jira.atlassian.com/browse/SRCTREE-7737

The bug is finally fixed in 4.2.0, build date 24-Aug-2022 (see https://www.sourcetreeapp.com/download-archives).

Installing Xcode is not a viable workaround, as xcode shouldn't be a required dependency for sourcetree. I do not have xcode installed, I confirmed the issue is resolved in 4.2.0. For anybody still stumbling on this issue, upgrade to 4.2.0, should do the trick.

vmpj November 25, 2022

I still got the same issue on 4.2.0. Downgrading to 4.1.2 also did not help.

Only fiddling with location settings in XCode, as described here, fixed it for me.

1 vote
Adam O_Dwyer May 4, 2022

Same issue in 4.1.7.

I do not have Xcode installed.

Searching Sourcetree docs for "requirements", "xcode" gives no results.

1 vote
michael_rarela January 6, 2022

Hmmm... this bug has existed for ~5 months.  SourceTree doesn't seem to receive bug fixes quickly.  Going to explore Fork instead.

michael_rarela February 22, 2022

Fork is working well for me.  But since I like the "Reverse Hunk" feature of SourceTree, I thought I'd give it another shot.

I was not successful with v4.1.6. (sadness).  Anyone else explore v4.1.6?

 

SourceTreeMergeIssue.png

rufwork July 14, 2022

Okay, normally I hate these "Fix my bug or I'm out of here!" posts, especially for free (if not Free) software, but I might make an exception this time. ;) 

With Fork, you can collapse all merge commits and only display those you need right now. Collapse all branches using the context menu of the graph and expand the ones you’d like to keep.

Hellll-low nice. I was just complaining about not being to do this today.

(Dirty secret: On Windows, I still use SourceTree v1.7 precisely to avoid these sorts of overly common dealbreaking bugs. I've yet to regret it.)

1 vote
Jerry Guo November 23, 2021

Same issue here with 4.1.3

1 vote
pix November 14, 2021

I have exactly the same issue.. on 4.1.3

1 vote
mikepearce September 7, 2021

Same issue here with 4.1.3

Roberto Gonzalez September 27, 2021

I reinstalled xcode tools and I'm facing the same issue.

Like Joris Joris likes this
Paul Li October 22, 2021

Downgrade to 4.1.1 fixed the issue for me.

Sourigna Phetsarath February 8, 2022

Has this been resolved in the latest release?  Still seems to be an issue.

0 votes
Bob Hatcher
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2023

This worked for me:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
0 votes
Joe Page December 19, 2021

same issue on version 4.5.1 (241)

I had it working fine before but can't get my merge tool to work with my new Mac

rufwork July 14, 2022

4.1.5 (rather than 4.5.1)?

0 votes
Alfonso Martin November 25, 2021

I guess this issue is the same as reported here?
https://jira.atlassian.com/browse/SRCTREE-7737

0 votes
Giancarlo Espinosa November 5, 2021

Same problem here. I reinsetalled XCode and command line tools and now having the same issue. 

Giancarlo Espinosa November 17, 2021

Downgrading to 4.1.2 fixed it for me.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events