Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree - external diff tool doesn't launch and conflicts disappear

Gilly Dekel
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!
August 17, 2014

Hi

I am using SourceTree with Xcode's FileMerge. This has always worked fine. Today, when I right click->resolve using external diff tool, I get a window for a second showing that the launch is happening, and then nothing and the conflict disappears as though resolved. This is really bad as I am unable to merge changes.

Going into preferences, I tried to change the diff tool, but I can't click on any of the values - everything seems to be locked.

Help?

14 answers

41 votes
easymile_vramiro
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!
January 12, 2017

I had the same problem, it turns out it was an Xcode problem

Run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

 

Andrea Ciani
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!
September 18, 2017

This worked for me

Yogesh Randhawa
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!
January 26, 2018

This worked for me

Alexey Shklyaev
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!
January 31, 2018

Yes that worked for me, using FileMerge

danielmarcotte
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!
February 17, 2018

I have no idea what this command is doing, but it fixed my problem. Thank you.

Roelof Koelewijn
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!
March 27, 2018

Super! this works for me.

Riley Hooper
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!
July 6, 2018

Worked for me running SourceTree 2.7.6 (177) and Xcode 9.4.1.

toni
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!
January 2, 2019

Thanks, solved by run that magic command.

Rodrigo S_ Chavarria Rivera
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!
January 23, 2019

It works great for me, perfectly

Becca Owens
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!
January 29, 2019

Worked for me. Thank you!

Gabriele Trabucco
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!
March 29, 2019

I came from a clean Mac Installation ... As you said I found the command line tool was not properly configured. Nice catch! Thanks

RichAppz
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!
April 26, 2019

Worked for me! Thanks

kakitayuri
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!
July 17, 2019

Just a note for anyone else stumbling on this page - this appears to be a Mac thing, not an iOS thing. I'm an Android dev that doesn't much use Xcode, but this was exactly what I needed. Not the first time Xcode has screwed my dev environments.

Rick Thomson August 27, 2019

I can confirm this worked for me, though had to change path to match my beta xcode location

thefrosty
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!
September 4, 2019

Worked for me, since I've got a clean Mac installation.

Jason Dahn
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!
October 9, 2019

Perfect, worked for me. Thank you!

Joseph Razon
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!
January 13, 2020

Worked for me, tnx :)

Tom Brückner January 29, 2020

Same here. Thanks.

tigerzhang
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!
March 2, 2020

Worked for me, Thank you!

halcyonix
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!
March 26, 2021

Also worked for me. Thanks a bunch!!

10 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2014
  • When the diff tool is not (correctly) configured, it behaves the way you described. (not very informative...)
  • In Tools\Options\General, you need to enable "Allow SourceTree to modify your global config files" at the top before you can change the Diff settings.
  • If you have the Diff / Merge tools set to "System default" (this is the default setting), it seems to never work.

So I think what you need to do is:

  1. enable the "Allow..." option
  2. change the diff tool to explicitly specify the right tool with the right cmd options
Duarte Molha May 28, 2015

This is still not working for me. THe external diff tool does not launch!

Trung Duy Van
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!
October 26, 2015

Thanks. It work perfect

hussien_khayoon
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!
March 3, 2016

In Mac, I had to go to SourceTree/Preferences/General

 

Lynna Landstreet
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!
March 15, 2016

This did not work for me. That option is checked, Diff/Merge tool is set explicitly to FileMerge (which is what it was using before it abruptly stopped working), and as recommended in another answer here, I have it set to Embedded Git rather than System Git, but none of that helped at all.

It used to work fine, and then suddenly stopped working a while back, without my having changed any configuration options whatsoever. I'm guessing it was when SourceTree automatically updated itself or something... But anyway, none of the answers in this post have helped for me.

Like # people like this
6 votes
Jeff McKnight
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!
February 20, 2018

Tested with Sourcetree v2.7.1 and DiffMerge v4.2.1 (with command line tools) on MacOS v10.13.3:

1. Open Sourcetree prefs and select `Diff` tab

2. Set `Visual Diff Tool` menu to `Custom`

3. Set `Diff command` field to: /usr/local/bin/diffmerge

4. Set `Arguments` field to: $LOCAL $REMOTE

5. Close prefs, select External Diff (or cmd-D) and observe DiffMerg launches.

 

More info here:

https://sourcegear.com/diffmerge/webhelp/sec__git__mac.html

t_anjan
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!
February 22, 2018

You can do the same for "Merge Command" too.

Merge Command:

/usr/local/bin/diffmerge

Arguments:

--merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"
Like # people like this
Jeff McKnight
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!
September 7, 2018

Works!

5 votes
jeremy_stafford
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!
July 18, 2016

None of these worked for me either. Using latest SourceTree with Beyond compare. It doesn't happen on every file. I don't know what the common factor is on the files that it does happen with. 

 

EDIT:

So it turns out the two files I was just trying to merge, the difference was that the file was no longer existent on the remote server. Rather than do something about the merge to show it was deleted, it just hung forever.

jorge granados
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!
February 14, 2017

This was the right answer. Files no longer exist on remote server. 

crobicha January 24, 2019

Was the solution for me as well. Can't believe there wasn't a simple error message or something, I spent a lot of time trying all of the other solutions, changing settings, etc

Like elsurudo likes this
Matt Brand March 4, 2019

This was what was happening for me. No diff = nothing happens.

4 votes
Joshua Wojcik
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!
August 12, 2015

I found changing to the Embedded Git rather than System Git fixed the problem.

sean bzd
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!
September 25, 2015

this resolved my issue as well

altaf-CosiGames
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 29, 2017

this resolved my issue as well. I had tried with DiffMerge & Beyond Compare. Switching to System Git fixed it for me

Thomas Luong
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!
July 25, 2018

This resolved my Issue.

1 vote
Jeff Sorrentino
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!
April 2, 2018

As a workaround I changed the name of my external diff app from

/Applications/DiffMerge

to

/Applications/_DiffMerge

Thus my diff command becomes

/Applications/_DiffMerge.app/Contents/MacOS/DiffMerge

with arguments

"$LOCAL" "$REMOTE" 
Jonathan Oliver
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 7, 2018

Even when I edited the .gitconfig diff tool path and fixed it by removing portion of the path, each time I'd restart DiffMerge, it would reappear.

/Applications/DiffMerge.app/Contents/MacOS/DiffMerge/Contents/MacOS/DiffMerge

So, here's the workaround.

1. Symlink DiffMerge to another location (so it's not auto-detected as DiffMerge)

ln -s /Application/DiffMerge.app /Applications/_DiffMerge.app

2. Then select a custom diff and merge tool arguments.

Diff command arguments:

--nosplash "$LOCAL" "$REMOTE"

Merge tool arguments:

--merge --result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"

Screen Shot 2018-11-07 at 7.03.22 PM.png

After this, SourceTree will no longer mangle the path at startup because it doesn't think it's DiffMerge anymore.

voidpointer2
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!
January 13, 2020

Works for me.  

Just wanted to note:

ln -s /Application/DiffMerge.app /Applications/_DiffMerge.app

Should be:

ln -s /Applications/DiffMerge.app /Applications/_DiffMerge.app

 I can't believe this trivial bug has not been fixed yet.

1 vote
milennium9
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!
December 17, 2016

I had same problem.

  1. open your git global config file.
  2. check syntax error.

then I can fix the problem.

I think this is sourcetree bug.

KevinCondon
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!
April 19, 2018

Yup, the path to diffmerge had part of it duplicated. Fixing it did the trick. Thanks!

1 vote
seanchon
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!
August 23, 2016

Same problem here. I had to accept the user agreement in the terminal before it would launch from SourceTree. Running 'sudo opendiff' worked for me.

Val Gorbatyuk
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!
September 21, 2016

 This was it for me

0 votes
Patrick Galbraith
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!
April 10, 2019

I had this issue on Windows. The problem was caused by an upgrade that inserted backslashes "\" into the merge command arguments.

\"$LOCAL\" \"$REMOTE\"

Should be changed to:

"$LOCAL" "$REMOTE"
ewbachtal
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!
June 6, 2019

Ooooooh!  A winner!  It's been months since external diff worked, I'd been through all the suggestions, saw those slashes but figured it was some sort of necessary string escaping and never considered that might be the cause.  Thank you!

0 votes
Becca Owens
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!
March 29, 2019

I was experiencing this as well, and discovered I'd had a derp moment. The file I was trying to merge had been deleted, therefore there was nothing to merge. :\

0 votes
Femi Ojemuyiwa
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 2, 2018

Nothing above works anymore for diffmerge. Is there going to be a fix in next release or shall we just try any and every solution?

Jonathan Oliver
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 7, 2018

I just posted a reply above that works as off SourceTree v3.0

0 votes
GarethJ
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!
May 9, 2017

The fix is yet to arrove but there's a workaround at https://jira.atlassian.com/browse/SRCTREE-2211

0 votes
Brad Curran
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!
July 5, 2016

If none of these things work, try running `opendiff` in the Terminal. 

It there's an error like below you need to do one of two things: 

  • Install XCode
  • Install another diff program

As of writing SourceTree supports the following programs:

  • Araxis Merge
  • Beyond Compare
  • BBEdit
  • DiffFork
  • DiffMerge
  • Changes
  • FileMerge
  • Kaleidoscope
  • KDiff3
  • P4Merge
  • TextWrangler

 

 

0 votes
greenboim
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!
December 6, 2015

Hi Yair,

I had the same problem.

As Balazs said, it was because the "System default" was selected for the merge tool. Download a tool and set it as your resolving tool.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events