Question

When I attempt to run FileMerge as a GUI for Opendiff, I receive an error:

$ git mergetool -t opendiff
Merging:
Gemfile
Gemfile.lock
...

Normal merge conflict for 'Gemfile':
  {local}: modified file
  {remote}: modified file
Hit return to start merge resolution tool (opendiff): 
2013-12-26 20:00:20.248 opendiff[22367:e07] Couldn't find FileMerge
Gemfile seems unchanged.
Was the merge successful? [y/n] ^C
$

I have installed XCode 4.6.3 and Command Line Tools for Xcode April 2013. I am running OSX 10.7.5

I have tried solutions from the following two links with no success:

git diff with opendiff gives "Couldn't launch FileMerge" error

Is filemerge still available after Xcode 4.3 installation?

When I go to Xcode -> Open Developer Tool I do not see FileMerge in the list of options. There is a More Developer Tools link that takes me here: https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-

How do I get FileMerge working?

Was it helpful?

Solution 2

Strange. "XCode 4.5, where is FileMerge ?" suggests:

The FileMerge that is bundled with Xcode 4.5 doesn't work as a standalone application. I tried compressing it from the application bundle. I was able to expand it to show the FileMerge app on the desktop. But when I tried to run it I got an error saying it couldn't be opened.

Apple's developer downloads site has every version of Xcode. You could try trashing your current version of Xcode 4.5, downloading Xcode 4.5 from the developer downloads site, and see if FileMerge is there. If not, you can download Xcode 4.4 and see if that has FileMerge.

Indeed, I downloaded a fresh new install of XCode 4.5 and put my updated 4.4 to 4.5 upgraded version into the trash and I have now all the developer tools again, including FileMerge. Weird...


The other option, from that same thread:

Why not just install the Command Line Tools? That will give you the "opendiff" tool. Then, you create a little script like this one to make it useful and actually do a merge.

#!/bin/sh

# Get a hold of the last parameter.
eval LAST=\${$#}

# Now run opendiff with the previous version and the current version.
opendiff ${*} -merge "$LAST"

OTHER TIPS

FileMerge is located at within Xcode.

From the command-line:

cd /Applications/Xcode.app/Contents/Applications/
open .

Go into that directory once it opens:

  1. Right-click on the app
  2. Choose "Make alias"
  3. Move that alias to your Applications directory

You're all set.

if you have xcode installed, then you can probably run the following from the command line to open FileMerge directly

open /Applications/Xcode.app/Contents/Applications/FileMerge.app/

Try reinstalling Xcode. I had the same issue and it fixed it for me! It appears the Merge utility got corrupt somehow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top