To diagnose the problem, I ran opendiff
from the Terminal. I received the following error:
xcode-select: error: tool ‘opendiff’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
To solve:
- Open Xcode > Preferences > Locations
- Click on the drop-down box beside Command Line Tools and select your current Xcode version. (This was empty for me because I had recently installed Xcode on a new Mac.)
- Run
opendiff
in Terminal again, and the above error should no longer appear.
Now FileMerge will open correctly from SourceTree when you click Launch External Merge Tool.