I regularly use Atlassian SourceTree (on Mac OS X) to launch FileMerge to resolve git merge conflicts. Out of the blue it has stopped working: when I right click and select Resolve Conflicts > Launch External Merge Tool
, FileMerge launches, creates its intermediate files, then immediately exits. SourceTree interprets that as the merge process being complete.
What's the issue and how can I debug/fix it?
I note that a previous question 'SourceTree filemerge quits immediately and creates 4 files. How to fix it?' does not address this particular scenario (for one, it says FileMerge quits in the title, but in the body it says FileMerge displays /dev/null as one of the panels. Additionally, my merge conflict is not due to a removed file.)
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:
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.