Using Beyond Compare with Version Control Systems (macOS)
macOS only
Beyond Compare can be configured as the external difference utility in many popular VCS applications. The following are configuration instructions submitted by our users. Let us know if you have one to add to the list.
Index:
Cornerstone SVN
In Cornerstone, you can specify a custom external compare script.
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
DIFF
Create an AppleScript wrapper for use by Cornerstone:-- Cornerstone executes the script as: -- /path/to/tool <original> <modified> -- on run argv set original_path to (item 1 of argv) set modified_path to (item 3 of argv) do shell script "/usr/local/bin/bcomp \"" & original_path & "\" \"" & modified_path & "\"" end run
Set in Preferences > General > External compare tool > Other Script...
Git
Git 2.3 and newer
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Diff
In a terminal:
git config --global diff.tool bc
To launch a diff using Beyond Compare, use the command: git difftool file.ext
Merge
In a terminal:
git config --global merge.tool bc
git config --global mergetool.bc.trustExitCode true
To launch a 3-way merge using Beyond Compare, use the command: git mergetool file.ext
Older versions of Git
- Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
- Add the following lines to
$HOME/.gitconfig
:
[diff]
tool = bcomp
[difftool]
prompt = false
[difftool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bcomp
[mergetool]
prompt = false
[mergetool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
- To launch a diff in Beyond Compare, use:
git difftool file.ext
To launch a merge in Beyond Compare, use:git mergetool file.ext
Git Fork
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Diff
- Select Preferences from the Fork menu.
- Select Integration.
- Select "Beyond Compare" from the External Diff Tool drop down.
Merge
- Select Preferences from the Fork menu.
- Select Integration.
- Select "Beyond Compare" from the Merge Tool drop down.
IntelliJ IDEA
(Potentially, also RubyMine, Webstorm, PyCharm, PhpStorm)
The first step is to launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
In IntelliJ's Settings dialog, under IDE Settings, select the External Diff Tools section:
Compare foldersPath to executable: /usr/local/bin/bcomp
Compare files
Path to executable: /usr/local/bin/bcomp
Merge tool
Path to executable: /usr/local/bin/bcomp
Parameters: %1 %2 %3 %4
Mercurial 2.4.2
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
[ui] merge = bcomp [extensions] extdiff = [extdiff] cmd.bcomp = /usr/local/bin/bcomp #opts.bcomp = -ro [merge-tools] bcomp.executable = /usr/local/bin/bcomp bcomp.args = $local $other $base $output bcomp.priority = 1 bcomp.premerge = True bcomp.gui = True
Perforce
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Diff
- Go to the P4V menu and select Preferences.
- Go to the Diff section and select Other application.
- Location:
/usr/local/bin/bcomp
- Arguments:
%1 %2
Merge
- Go to the P4V menu and select Preferences.
- Go to the Merge section and select Other application.
- Location:
/usr/local/bin/bcomp
- Arguments:
%1 %2 %b %r
SmartCVS
- Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
- Launch SmartCVS, select Preferences > File Comparators.
- Select * in the table and click edit.
- Add
/usr/local/bin/bcomp
in Command and${leftFile} ${rightFile}
in Arguments. - Click OK.
SmartGit
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Diff
- Select SmartGit > Preferences.
- Go to Tools > Diff Tools.
- Click Add.
- File Pattern: *
- Select External diff tool.
- Command:
/usr/local/bin/bcomp
- Arguments:
-readonly -lefttitle=${leftTitle} -righttitle=${rightTitle} ${leftFile} ${rightFile}
Merge
- Select SmartGit > Preferences.
- Go to Tools > Conflict Solvers.
- Click Add.
- File Pattern: *
- Select External Conflict Solver.
- Command:
/usr/local/bin/bcomp
- Arguments:
${leftFile} ${rightFile} ${baseFile} -mergeoutput=${mergedFile}
SmartSVN
- Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
- Launch SmartSVN, select Preferences > File Comparators.
- Select * in the table and click edit.
- Add
/usr/local/bin/bcomp
in Command and${leftFile} ${rightFile}
in Arguments. - Click OK.
SourceTree
From the Beyond Compare menu, Install Command Line Tools. Then:
Visual Diff Tool: Other Diff Command:/usr/local/bin/bcomp Parameters:-ro $LOCAL $REMOTE Merge Tool: Other Merge Command:/usr/local/bin/bcomp Parameters:$LOCAL $REMOTE $BASE $MERGED
Subversion
Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Diff
Create a file named /usr/local/bin/bcdiff.sh
and allow execute permissions (chmod +x).
Add the following lines:
/usr/local/bin/bcomp "$6" "$7" -title1="$3" -title2="$5" -readonly
exit 0
Edit $HOME/.subversion/config
and add the line diff-cmd = /usr/local/bin/bcdiff.sh
in [Helpers].
Merge
Create a file named /usr/local/bin/bcmerge.sh
and allow execute permissions (chmod +x).
Add the following line:
/usr/local/bin/bcomp "$2" "$3" "$1" "$4"
Edit $HOME/.subversion/config
and add the line merge-tool-cmd = /usr/local/bin/bcmerge.sh
in [Helpers].
Syncovery Mac
The first step is to launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
Then to configure Syncovery:
- Select menu Syncovery/Preferences.
- Click the Misc tab.
- In the field Program used to compare files from the Sync Preview, write
/usr/local/bin/bcompare
(or the pathname given when using BC4's Install Command Line Tools). - Click Close.
Tower (Git)
(Requires Tower 2.0.5 or newer)- Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
- Open Tower's preferences dialog on the Git Config Tab.
- Set the Diff Tool drop-down to Beyond Compare.
- Set the Merge tool drop-down to Beyond Compare.