我们能像在TFS中那样找到两个文件的差异吗?

huangapple go评论52阅读模式
英文:

Can we find the differences from 2 files like in TFS?

问题

我想看一下两个页面的区别,就像在 .cs / .cshtml 文件中那样
或者微软技术中的任何东西。

**示例:**在部署之前,比较服务器文件与我的开发文件的更改,以进行测试。

先行感谢。

尝试通过创建批处理文件。

英文:

I want to see the difference from two pages like in .cs / .cshtml files
Or anything in Microsoft technology.

Example: Compare server file with my development file of changes before deployment for my test.

Thanks in advance.

Tried by creating the batch file.

答案1

得分: 1

这是Visual Studio内置的一个功能。实际上,我相当确定这是GitHub集成在Visual Studio中使用的默认功能。

所以,从Visual Studio中,选择“View->Other Windows->Command window”。

这个:

我们能像在TFS中那样找到两个文件的差异吗?

现在,命令提示符确实对文件夹和目录有很好的智能感知,但这些路径名有点“混乱”。我一直打算设置一个辅助工具来提示/浏览文件对话框以选择两个文件。

不管怎样,结果看起来像这样:

命令行:

我们能像在TFS中那样找到两个文件的差异吗?

结果:

我们能像在TFS中那样找到两个文件的差异吗?

现在,当然,GitHub已经完全集成到Visual Studio中了?

我不必再做任何事情,只需在查看代码时选择这个:

在代码中右键单击,git->

这个:

我们能像在TFS中那样找到两个文件的差异吗?

所以,现在Visual Studio与GitHub有了100%非常好的集成?
(我甚至不太了解GitHub,但在VS中我不需要了解)。

所以,我可以随时(自从我的上次提交以来)在代码中右键单击并查看未更改(以前)提交的代码。你提到了使用TFS,我相当确定它是一样的。

不管怎样,你现在可能一直在使用的“相同”的差异工具?
它可以用来比较任何文件 - 不仅仅是那些作为TFS或GIT仓库的一部分的文件。

英文:

there is one built into Visual Studio. In fact, quite sure it is the default one that GitHub integreation used in Visual Studio uses.

So, from Visual studio,View->Other Windows->Command window.

this one:

我们能像在TFS中那样找到两个文件的差异吗?

Now, the command prompt DOES have nice intel-sense for folders and directories, but those path names are "messy". I been meaning to setup a helper utility to prompt/browse to the file dialog to select both files.

Regardless, the result looks like this:

command line:

我们能像在TFS中那样找到两个文件的差异吗?

And result:

我们能像在TFS中那样找到两个文件的差异吗?

Now, of course with github integrated right into visual studio?

I don't have to do anything more then choose this while looking at code:

right click in code, git->

this:

我们能像在TFS中那样找到两个文件的差异吗?

So, now that VS has 100% and VERY nice integration with GitHub?
(and I don't even know GitHub well, but in VS I don't have to).

So, I can at any time (since my last commits) simple right click in code and view the un-change (previous) committed code. You noted use of TFS, and quite sure it is the same.

Regardless, the "same" diff tool you probably been using now?
It is and can be used to compare any files - not just those limited that are part of a TFS or GIT repo.

huangapple
  • 本文由 发表于 2023年6月22日 00:50:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76525527.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定