Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Last active April 5, 2024 21:53
Show Gist options
  • Save jfromaniello/9207698 to your computer and use it in GitHub Desktop.
Save jfromaniello/9207698 to your computer and use it in GitHub Desktop.
Integrate beyond compare 4 with git

Install command line tools:

then run this:

git config --global diff.tool bc3
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true
ln -s /usr/local/bin/bcomp /usr/local/bin/bc3

now use git difftool and git mergetool.

SourceTree

For diff:

Visual Diff Tool: Other, Command: /usr/local/bin/bcomp, Arguments: $LOCAL $REMOTE

For merge:

Visual Diff Tool: Other, Command: /usr/local/bin/bcomp, Arguments: $LOCAL $REMOTE $BASE -mergeoutput=$MERGED

@tjtaill
Copy link

tjtaill commented Jan 7, 2017

I really can't beyond compare 4 setup on mac followed these instructions and many others in the bc forums as well nothing works

@jfromaniello
Copy link
Author

This is my current ~/.gitconfig

[diff]
	tool = bc3
[difftool "bc3"]
	trustExitCode = true
[merge]
	tool = bc3
[mergetool "bc3"]
	trustExitCode = true

I followed the instructions here:
http://www.scootersoftware.com/support.php?zz=kb_vcs#gitlinux

@edwardbeckett
Copy link

I've had this working fine for a couple years ~ I'm on Windows but just change the path to your install on nix | macOs

~/.gitconfig

[merge]
	tool = bc4
[mergetool]
	prompt = false

[diff]
	tool = bc4
	stat = true
	guitool = bc4
[difftool]
	prompt = false
[difftool "bc4"]
    path = \"C:/Program Files/Beyond Compare 4/bcomp.exe\"
    cmd = \"C:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
    trustExitCode = true
[mergetool "bc4"]
    path = \"C:/Program Files/Beyond Compare 4/bcomp.exe\"
    cmd =  \"C:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
    trustExitCode = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment