Git-配置difftool和mergetool

git自带的difftool和mergetool使用不习惯,配置difftool和mergetool为Beyond Compare 3。

git的配置文件一般在C:Users用户名.gitconfig。我使用的MinGW Shell,git的配置文件在C:MinGWmsys1.0home用户名.gitconfig

 1 [diff]
 2     tool = bc3
 3 [difftool]
 4     prompt = false
 5 [difftool "bc3"]
 6     cmd = "D:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "$LOCAL" "$REMOTE"
 7 [merge]
 8     tool = bc3
 9 [mergetool]
10     prompt = false
11     keepBackup = false
12 [mergetool "bc3"]
13     cmd = ""D:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "$LOCAL" "$REMOTE" "$BASE" "$MERGED""
14     trustexitcode = true

使用git config --global alias.别名 ‘真名’

1 git config --global alias.dt 'difftool'
2 git config --global alias.mt 'mergetool'

链接:https://pan.baidu.com/s/1EVXtYJVjqknXPnWYGk7vIg 密码:xnjz

原文地址:https://www.cnblogs.com/hwli/p/8885433.html