For Git 1.7.6 and newer, edit the global config file to set the path:
新版本的配置方式
Diff
At a Windows command prompt enter the commands:
git config --global diff.tool bc3
git config --global difftool.bc3.path "c:/program files/beyond compare 3/bcomp.exe"
To launch a diff with BC3, use the command “git difftool foofile.txt”.
3-way Merge (v3 Pro)
At a Windows command prompt, enter the commands:
git config --global merge.tool bc3
git config --global mergetool.bc3.path "c:/program files/beyond compare 3/bcomp.exe"
To launch a 3-way merge with BC3, use the command “git mergetool foofile.txt”.
也可以直接修改.gitconfig文件,直接增加如下
[diff]
tool = bc3
[difftool "bc3"]
path = d:/program files/beyond compare 3/bcomp.exe
[merge]
tool = bc3
[mergetool "bc3"]
path = d:/program files/beyond compare 3/bcomp.exe
具体地址根据个人电脑配置