我想配置Visual Studio打开超越比较默认作为差异工具。我该怎么做呢?
当前回答
我使用VS 2017与Git托管的项目在visualstudio.com托管(msdn)
上面的链接为我工作与“GITHUB for WINDOWS”指令。
http://www.scootersoftware.com/support.php?zz=kb_vcs#githubwindows
配置文件位于“c:\users\username\”的位置。gitconfig”,我只是根据我的情况将BC4更改为BC3,并使用适当的路径:
C:/Program Files (x86)/Beyond Compare 3/bcomp.exe
其他回答
Visual Studio with Git for Windows
如果你使用GIT作为你的源代码管理系统,而不是(相当过时的)TFVC,那么Visual Studio就没有选项来配置这样的东西。 相反,它(在我看来)使用了GIT配置文件的设置。因此,如果你已经安装了GIT,可以使用Beyond Compare或任何其他第三方比较软件,它就会选择这个并开始使用它。
如果没有,那就设置一下(参见这里获得更多最新的帮助)。使用Beyond Compare 4设置Visual Studio的相关信息如下:
Open Visual Studio. Select Options from the Tools menu. Select Plug-In Settings under the Source Control branch of the left-side tree control. Select Microsoft Git Provider under Plug-In Settings on the right-hand pane. Edit the global git config file (location is OS specific for windows it's %HOMEDRIVE%%HOMEPATH%/.gitconfig. See here for info) OR if you want it to be repo specifict then after starting a project in a Git repository, edit the config file in the .git folder in the project folder. Change the config file to reflect the following changes: [diff] tool = bc4 [difftool "bc4"] cmd = \"C:\\Program Files (x86)\\Beyond Compare 4\\BComp.exe\" \"$LOCAL\" \"$REMOTE\" [merge] tool = bc4 [mergetool "bc4"] cmd = \"C:\\Program Files (x86)\\Beyond Compare 4\\BComp.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
如果使用64位安装程序,请验证可执行文件的名称。我的 是BCompare.exe
[diff]
tool = bc4
[difftool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
Issues: If you create a new project and get VS to create the git repo at the same time it WILL add a load of overrides to the .git/config file forcing it to use Visual Studio again (Thanks for that MS!). SO either create the git repo via another means after the project has been setup (like via SourceTree or the command line etc...) OR edit the .git/config file (in the solution folder) and remove any overrides for the above settings. Thanks to minnow in the comments for bringing my attention to it again.
注意:我一直遇到这种情况,但我使用VS与GIT和 答案是不正确的,尽管一些评论提到了一个URL 正确的答案是不清楚的,如果我一直错过它,我 当然其他人会这样做,所以希望这将解决这个问题。
如果您正在使用TFS,您可以在Team Foundation -通用命令和参数值中的diff/merge配置中找到更多信息
介绍如何配置以下工具:
WinDiff DiffDoc(适用于Word文件) WinMerge 无以伦比 KDiff3 Araxis 比较它! SourceGear DiffMerge 无与伦比3 TortoiseMerge 视觉SlickEdit
在Visual Studio 2008 +中,转到
工具菜单——>选择选项
在选项窗口——>展开源控制——>选择颠覆用户 选择超越比较
单击“确定”按钮..
我使用BC3作为我的git差异,但我也会将vscode添加到有用的git差异工具列表中。有些用户更喜欢vscode而不是vs ide体验。
使用VS Code的Git差异
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
64位Windows 7上的VS2013需要这些设置: 工具|选项|源码控制| Jazz源码控制
使用外部比较工具…(很容易忽略)
双向比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
三向冲突比较 可执行文件位置:C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
推荐文章
- Nuget连接尝试失败“无法为源加载服务索引”
- 在Visual Studio中查看多个项目/解决方案
- Visual Studio打开默认浏览器,而不是Internet Explorer
- csproj文件中的“Service Include”是干什么用的?
- 如何在Visual Studio中找到堆栈跟踪?
- 使用不同的Web。在开发和生产环境中进行配置
- 是否有一种方法可以在Visual Studio中删除一行而不剪切它?
- Microsoft Visual Studio的推荐插件
- Visual Studio: ContextSwitchDeadlock
- Visual Studio:如何打破处理异常?
- VS 2017 Git本地提交数据库。每次提交时锁定错误
- 无法启动IIS Express Web服务器,注册URL失败,访问被拒绝
- 如何下载Visual Studio社区版2015(不是2017)
- 查找和替换-添加回车符或换行符
- Visual Studio Community和其他付费版本的区别是什么?