在使用git的Visual Studio 2015中提交之间存在差异 [英] Diff between commits in Visual Studio 2015 using git

查看:146
本文介绍了在使用git的Visual Studio 2015中提交之间存在差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2015 Update 2和git作为源代码控制,你如何区分分支上的两个提交?请注意,我不是在细粒度的文件级别(即文件和比较的查看历史记录)上讨论diff,而是针对整个提交。



我希望在查看分支历史记录时能够进行比较,但该选项不存在。这里是右键菜单,当我在查看分支历史记录时右键单击提交时看到:



哪里比较?

解决方案

虽然在Visual Studio 2015中不可行,但此功能将会包括在Visual Studio 2017中。



在Visual Studio 2017中,可以在两个不同的提交之间获得更改。可以通过在历史页面上选择两个提交并选择比较提交...命令来访问此功能:



Visual Studio 2017的预览版本中提供了此功能,因此您可以尝试一下,看看它是否是您要查找的内容。


Using Visual Studio 2015 Update 2 and git as source control, how do you diff between 2 commits on a branch? Note that I am not talking about diff on the granular file level (ie. view history of file and comparing), but rather for entire commits.

I would expect to be able to compare when looking at the history of a branch, but the option does not exist. Here's the right click menu I see when I right click on a commit when viewing the history of a branch:

Where's the compare??

解决方案

While not possible in Visual Studio 2015, this functionality will be included in Visual Studio 2017.

In Visual Studio 2017 it will be possible to get the changes between two different commits. This functionality can be accessed via selecting two commits on the history page and choosing the "Compare Commits..." command:

This functionality is present in the preview releases of Visual Studio 2017, so you can try it out and see if it is what you are looking for.

这篇关于在使用git的Visual Studio 2015中提交之间存在差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆