Space Cat, Prince Among Thieves

Using Beyond Compare 4 Mac Beta with Git

A little over a year ago I wrote a post about using Beyond Compare on Mac via Wine. A native version is now in beta and open to everyone! If you haven't tried Beyond Compare, I suggest you do. If you have you already know how awesome it is.

I've been testing the Alpha for many months now and thought I'd throw together some instructions for getting it going with git.

You can download the beta here:

After you have the App installed, the next step is to install the command line tools. All other steps require this.

From the App, go to the "Beyond Compare" drop down menu and choose "Install Command Line Tools...". It will then prompt you for your password. After this, you bcomp file1.txt file2.txt

Using with Git CLI

The next step is to set it up as a git diff tool and merge tool. Git already has native support for it built in thanks to the Linux client having existed for years now.

This can be achieved simply by running the following commands.

$ git config --global diff.tool bc3
$ git config --global difftool.prompt false
$ git config --global merge.tool bc3

This simple setup will leave git diff and git merge functioning as usual, as well as allowing you to use Beyond Compare for the task by doing git difftool and git mergetool.

I highly recommend giving Beyond Compare a go as a merge tool next time you need to do a merge as it makes it wonderfully simple (when you understand whats going on with the 4 sections anyway).

Using with Tower 1.x

Update: Tower 2.0.6+ include built in support for Beyond Compare which the following instructions will interfere with.

  1. Quit Tower
  2. Navigate to ~/Library/Application\ Support/Tower
  3. Create a CompareScripts folder if one does not already exist.
  4. Download and place it in the new CompareScripts folder.
  5. Make it executable via chmod +x
  6. Download CompareTools.plist and place it in the ~/Library/Application\ Support/Tower directory. Rename / move any old version that might exist.

Using with SourceTree

  1. Open SourceTree
  2. Open "Preferences" from the SourceTree menu
  3. Along the top bar, choose the "Diff" tab.
  4. Under External Diff / Merge
    1. for Visual Diff Tool choose Other then in the Diff Command enter /usr/local/bin/bcomp and for Arguments enter $LOCAL $REMOTE
    2. For Merge Tool choose Other and in Merge Command enter /usr/local/bin/bcomp and for Arguments enter $LOCAL $REMOTE $BASE $MERGED

Comment by: Pat O'Callaghan on

Pat O'Callaghan's Gravatar Thanks for this! Worked like a charm..

Comment by: James on

James's Gravatar Many thanks - didn't realise BeyondCompare had CLI tools - I had been pointing SourceTree to the folder.
Many thanks

Comment by: Jeroen Wiert Pluimers on

Jeroen Wiert Pluimers's Gravatar You might want to add -ro to the difftool arguments as mentioned in

Comment by: Terry on

Terry's Gravatar Thanks. I had been using command line tools for Windows version for many years. Didn't remember or notice that I needed to install separately for Mac OSX. I couldn't get 'open -a Beyond\ Compare session-name' to work. This is great.

Comment by: Evgeny Goldin on

Evgeny Goldin's Gravatar Thanks! Made it work with SourceTree

Comment by: Marc on

Marc's Gravatar Thanks! So happy to discover BC2 is now on the Mac for less than other tools, AND thanks to your post that git has support for it built in now, too!

Comment by: Ben Nadel on

Ben Nadel's Gravatar Thanks! I couldn't figure out where the command-line tools were. I didn't realize that I had to ask BeyondCompare to install them. Awesome!

Email address will never be publicly visible.

Basic HTML allowed.