I am running OS X.10, Xcode 7 and SourceTree 2.

When I select a conflicted file and Launch an external merge tool, there is a window that appears very briefly... and then nothing happens.

I tried (see this help page) sudo ln -s /Developer/usr/bin/opendiff /usr/bin/opendiff but it did not work (I got the message ln: /usr/bin/opendiff: File exists).

What should I do?


Here is a picture of the window that briefly appears.

enter image description here


Here are the SourceTree preferences:

enter image description here

  • Note that that help pages says it is for Xcode 4.2 and was written a few years ago - what version of Xcode do you have? Also anything that says chnage things in /usr/bin is a suspect source and now will not work in El Capitan. Also the error is because you already have /usr/bin/opendiff so the whole change is pointless
    – mmmmmm
    Commented Nov 4, 2015 at 22:03
  • Have you run Xcode and agreed to the licence terms
    – mmmmmm
    Commented Nov 4, 2015 at 22:06
  • I run Xcode 7 indeed! (but does this really make a difference?)
    – Colas
    Commented Nov 4, 2015 at 22:08
  • Have you installed command line tools? What does /usr/bin/opendiff show when run in the terminal
    – mmmmmm
    Commented Nov 4, 2015 at 22:10
  • 2015-11-04 17:11:32.360 opendiff[10848:132187] too few arguments 2015-11-04 17:11:32.365 opendiff[10848:132187] usage: opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile]
    – Colas
    Commented Nov 4, 2015 at 22:11

2 Answers 2


My problem was that I was running a previous version of Xcode and I hadn't set the command line tools.

Select the tools in Xcode's preferences -> locations:

enter image description here

Then run this command in terminal to verify:

git config --global -l

The git command will print out the path for the diff tool, amongst other config info. If it's not configured, it will output an error with something along the lines of the following:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),

Assuming you are on latest version of SourceTree (Version (

Try adding the following manually to your .gitconfig (or verify that SourceTree has put these exact lines)

[mergetool "sourcetree"]
    cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    trustExitCode = true

Or you could just enable "Allow sourcetree to modify your global mercurial and git configuration files." in Preferences -> General tab

These lines will be automatically updated

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .