Foreword
At work, when using git, in most cases we will use some visual tools, such as TortoiseGit, SourceTree and so on. Sometimes, however, we will use the git command line, such as joint use of time gerrit. Today, we are concerned that how to configure git of mergetool, difftool, a total of two ways.
the first method
Using the command line configuration:
windows
difftool
git config --global diff.tool bc3
git config --global difftool.bc3.path "bcomp.exe的路径"
mergetool
git config --global merge.tool bc3
git config --global mergetool.bc3.path "bcomp.exe的路径"
For example, such as the path of my computer bcomp.exe is D: \ Program Files (x86) \ Beyond Compare 3 \ BComp.exe, then I can be configured
git config --global merge.tool bc3
git config --global mergetool.bc3.path "D:\\Program Files (x86)\\Beyond Compare 3\\BComp.exe"
The second method
Gitconfig arranged directly in the document, may be C: \ Users {UserName} .gitconfig configuration file. If you want to know more gitConfig, I can read this blog post illustrates the use Git config
[merge]
tool = bc3
[mergetool "bc3"] path = D:\\Program Files (x86)\\Beyond Compare 3\\BComp.exe [diff] tool = bc3 [difftool "bc3"] path = D:\\Program Files (x86)\\Beyond Compare 3\\BComp.exe