Recently a developer colleague of mine was asking about diff tools. We let him know that he can use Homebrew to install a ported version of the ‘diff’ tool provided by GNU utils.
An expensive alternative is Kaleidoscope app, which looks great but might be overkill for our purposes.
The good news is that XCode provides a GUI tool called FileMerge, which is also
known as opendiff
from the command line. You do have to agree to the Xcode/iOS
license, which requires local admin privileges, to use this tool.
$ which opendiff
/usr/bin/opendiff
It appears to provide a very intuitive GUI representation of the differences. You can also configure it to be the default merge tool with Git.
git config --global merge.tool opendiff
If you want to launch FileMerge from the Launcher, you’ll need to open the Applications folder, right-click on XCode, choose to ‘Show Package Contents’, then navigate to Contents/Applications. Inside you’ll see the FileMerge application.
If you right-click on FileMerge, you can right-click, choose to ‘Make Alias’, then move the alias to your Applications folder.