在 ~/.gitconfig中添加以下配置项:
[diff]
tool = bc4
[difftool]
prompt = false
[difftool "bc4"]
cmd = "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\""
[merge]
tool = bc
[mergetool]
prompt = false
[mergetool "bc4"]
cmd = "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
查看某个文件的历史提交记录:
git log 文件
调用BeyondCompare将指定文件的某个历史版本与当前工作目录中的比较:
git difftool 0e36caa9d442f98ba8dea2b94fa21022b53426ce -- 文件
16:36