本文介绍了使用Git插件时Visual Studio中的差异工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Microsoft已发布了适用于Visual Studio 2012的Git插件.我发现它非常出色,但是似乎没有任何选项可以更改默认的Diff工具.更糟糕的是,我根本无法对ascx代码隐藏文件进行比较.它只显示主要.ASCX文件的diff选项.
Microsoft has released a Git plugin for Visual Studio 2012. I have found it to be excellent, but there doesn't seem to be any option to change the default Diff tool. Worse, I cannot do a diff at all on ascx codebehind files. It only shows a diff option for the main .ASCX file.
你怎么样
- 使用git插件时是否将代码隐藏在文件中?
- 更改差异工具吗?
推荐答案
您必须更改本地.gitconfig,而不是像使用TFS那样通过Visual Studio进行更改
You have to change your local .gitconfig, rather than make the change through Visual Studio as you would with TFS
https://gist.github.com/mkchandler/2377564
Add the following to your global .gitconfig file:
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" -merge -result=\"$PWD/$MERGED\" \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\"
trustExitCode = true
[mergetool]
keepBackup = false
这篇关于使用Git插件时Visual Studio中的差异工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!