Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Beyond compare with Git command line

I have been trying to figure out how configure beyond compare to be used via command line when using Git on windows (cygwin). Based on beyond compare's documentation they ask you to just use "path" to the bcomp.exe installation and everything should work. But it does not automatically pick up the "Local", "Base" and "Remote" params. I am using Beyond compare 3.0 PRO.

like image 303
Saurabh Avatar asked Jul 17 '14 16:07

Saurabh


People also ask

How do I create a Diff in Beyond Compare?

Generating a patch for multiple files in Beyond CompareEdit | Select All Files. Actions | File Compare Report. In the Report Layout list, pick Patch and change the Patch Style to Normal diff. In the Output Options, pick Plain text and click Save As to generate the file.


2 Answers

I figured out the answer with a little bit of tinkering around with the git config. Note: I edited the global git config in notepad and here's how my config looks after i was done. Hope this helps someone.

[diff]
 tool = bc4
[difftool "bc4"]
 cmd =  "C:/program\\ files\\ \\(x86\\)/beyond\\ compare\\ 4/bcomp.exe $LOCAL $REMOTE"
[merge]
 tool = bc4
[mergetool "bc4"]
 cmd = "C:/Program\\ Files\\ \\(x86\\)/Beyond\\ Compare\\ 4/Bcomp.exe $LOCAL $REMOTE $BASE $MERGED"
 trustExitCode = true
 keepBackup = false
like image 161
Saurabh Avatar answered Sep 28 '22 08:09

Saurabh


Beyond compare version 3.

For Linux in terminal type following commands:

git config --global diff.tool bc3
git config --global difftool.prompt false
git config --global difftool.bc3 trustExitCode true

git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true

For windows type following (you need to tell git the path to bcomp.exe)

git config --global difftool.bc3.path "c:/program files (x86)/beyond compare 3/BCompare.exe"
git config --global mergetool.bc3.path "c:/program files (x86)/beyond compare 3/bcomp.exe"
like image 44
Aram Avatar answered Sep 28 '22 06:09

Aram