Skip to content

Instantly share code, notes, and snippets.

@jonlabelle
Last active May 14, 2024 11:46
Show Gist options
  • Save jonlabelle/0bae07b505cbb422185ecaee08fb1bb9 to your computer and use it in GitHub Desktop.
Save jonlabelle/0bae07b505cbb422185ecaee08fb1bb9 to your computer and use it in GitHub Desktop.
Use Beyond Compare with Git

Use Beyond Compare with Git

Install command line tools

You can install the command line tools from the File menu, Install command line tools.

  • /usr/local/bin/bcomp: Launches comparison and waits for it to complete.
  • /usr/local/bin/bcompare: Launches comparison and returns immediately.

Git config

macOS

Diff

[diff]
    tool = bcomp

[difftool]
    prompt = false

[difftool "bcomp"]
    trustExitCode = true
    cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\"

To launch a diff in Beyond Compare, run: git difftool file.ext

Merge

[merge]
    tool = bcomp

[mergetool]
    prompt = false

[mergetool "bcomp"]
    trustExitCode = true
    cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"

To launch a 3-way merge in Beyond Compare, run: git mergetool file.ext

References

Meta

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