VS自带的合并工具并不理想,个人比较习惯Beyond Compare,这里替换成Beyond Compare,因为并不想改变所有的VS项目设置,这里以单个仓库项目为例,源代码管理器使用GIT
找到.git下的config文件增加如下设置(默认是没有设置该选项的)
[diff] tool = bc4 [difftool "bc4"] cmd = "D:\Program Files (x86)\Beyond Compare 4\BComp.exe" "$LOCAL" "$REMOTE" [merge] tool = bc4 [mergetool "bc4"] cmd = "D:\Program Files (x86)\Beyond Compare 4\BComp.exe" "$REMOTE" "$LOCAL" "$BASE" "$MERGED"
diff :配置比较工具
merge:配置合并工具
cmd:工具执行路径
此处也可以使用git命令来完成 根据config 范围不同,可以修改所有仓库都使用BC
也可以只配置合并工具不配置比较 ,VS自带的比较界面基本够用了,直接注释掉,用的时候删除注释即可
#[diff] # tool = bc4 #[difftool "bc4"] # cmd = "D:\Program Files (x86)\Beyond Compare 4\BComp.exe" "$LOCAL" "$REMOTE" [merge] tool = bc4 [mergetool "bc4"] cmd = "D:\Program Files (x86)\Beyond Compare 4\BComp.exe" "$REMOTE" "$LOCAL" "$BASE" "$MERGED"
测试环境:VS2015+WIN10企业版