[英]Replace visual studio 2012 Diff tool with winmerge when using Microsoft Git Provider
[英]The diff tool in Visual Studio when using the Git Plugin
微軟已經為Visual Studio 2012發布了一個Git插件 。 我發現它很棒,但似乎沒有任何選項可以更改默認的Diff工具。 更糟糕的是,我無法對ascx代碼隱藏文件做差異。 它僅顯示主.ASCX文件的diff選項。
你怎么
您必須更改本地.gitconfig,而不是像使用TFS那樣通過Visual Studio進行更改
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
腳步 :
安裝Winmerge並將“ WinMerge添加到您的PATH環境變量 ”,您必須在winmerge安裝期間選中該復選框。
應在Visual Studio 2013中安裝Microsoft GIT提供程序插件。
轉到用戶git config,通常在“ C:\\ Users \\ USERNAME \\ .gitconfig ”中
添加以下行或根據.gitconfig中的參數進行更新
**
[diff]
tool = winmerge
[difftool "winmerge"]
cmd = winmergeu.exe -e -ub -x -wl -u -maximise -dl "base" -dr "mine" \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
**
現在來自Visual studio,如果你在文件winmerge上“與未經修改...比較”應該自動打開。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.