且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 Visual Studio 2013 时,用于源代码控制的 TFVC(TFS 版本控制)和 Git 之间的最大区别是什么?

更新时间:2022-04-02 05:39:09

更新

自 2013 年以来发生了很多事情:

Update

Since 2013 a lot has happened:

  • Microsoft 已为 Team Foundation Server、Azure DevOps Server 和 Azure DevOps 添加了 ssh 支持.
  • Visual Studio 2019 16.8+ 附带一个经过全面改进的 git 客户端.
  • Microsoft 已将自己的内部产品从 TFVC 中移除.Windows 和 Office 源现在位于 Azure DevOps 的 Git 中.
  • 微软已经收购了 GitHub,它现在是 DevOps 相关产品的主要焦点,因此许多为 Azure DevOps 做出贡献的人已转移到 GitHub.
  • Git & 虚拟文件系统Git 大型文件系统解决了人们继续使用 TFVC 的许多原因.
  • Azure DevOps 有一个内置的迁移工具,可以将您的(部分)TFVC 历史转换为 git 存储库.

在这段时间里,TFVC 几乎没有发生什么:

In all this time very little happened for TFVC:

  • YAML 管道在推出 2 年后仍未获得 TFVC 支持(我完全不期待这些).
  • Team Explorer 现在更名为Legacy";在 Visual Studio 中
  • TFVC 已声明功能完成
  • 对 Eclipse 和 Visual Studio Code 以及 Linux/Mac 的 TFVC 支持已正式弃用/生命周期结束.

很明显谁赢了:Git.

It's pretty clear who has won: Git.

在使用 VS 2013 时,TFS 和 Git 在源代码控制方面的最大区别是什么?

What are the big differences between TFS and Git for source control when using VS 2013?

MSDN 有一个 非常详尽的页面,介绍了 Team Foundation 版本控制和 Git 之间的所有功能和差异.

就我而言,唯一的好处是本地存储库(并不是说这无关紧要)和 IoS 开发支持?

Is the only benefit in my case a local repository (not saying that's insignificant) and IoS development support?

不,还有很多,但它们通常是 Git 的高级场景.本地存储库、离线支持和完整的本地历史保真度非常强大,您可以使用 Visual Studio 开箱即用.还有一些其他功能也很棒!从一个存储库分支和合并到另一个存储库的能力非常强大.我建议您查找 Pro Git book 以了解这些内容.TFS 中的 Git 只是另一个 git 服务器,它具有标准 Git 的几乎所有功能.

No, there's lot more, but they're often advanced scenario's of Git. Local Repo, offline support and full local fidelity on history is incredibly powerful, you get that out of the box with Visual Studio. There's a few other features that are great too! The ability to branch and merge from one repository to another is very powerful. I recommend you look up the Pro Git book for those. Git in TFS is just another git server, it has pretty much all features that the standard Git has.

在合并之前重写历史记录的能力允许您删除或合并一些较小的更改集,从而使历史记录更清晰,更易于人类阅读.

The ability to rewrite history before merging allows you to remove or combine a number of smaller change sets, so that the history is cleaner and easier to read as a human.

命令行界面是 Git 的唯一缺点(有些人认为这不是缺点;-P).

Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).

TFVC 也有命令行,只是人们不使用它.对于那些想要使用 Git 并且永远不会比 TFVC 做得更多的人来说,他们可能真的不需要离开 UI,但他们不会获得很多很酷的功能......

TFVC has a command line too, people just don't use it. For people that want to use Git and never do much more than TFVC does, they probably won't really need to leave the UI, they won't get a lot of the cool features though...

可能还有其他一些缺点,主要是因为它与人们习惯的不同.如果您在做事时不花时间学习 git 的作用,那么在脚下开枪并不难.Rebase 和 Squash 之类的东西真的很强大,可以创建一个非常干净的历史记录,但是如果使用不当,它会给人们留下无法合并的问题.TFS 有能力进行一些安全设置以剥夺在 git 存储库上做出非常愚蠢的决定的权利.

There might be a few other drawbacks, mostly due to the fact that it's different than what people are used to. It's not too hard to shoot yourself in the foot if you don't take the time to learn what git does when you do things. Things like Rebase and Squash are really powerful and create a very clean history, but it can leave people with the problem that they can't merge anymore if used incorrectly. TFS has the ability to put some security settings to take away the rights to make very stupid decisions on a git repository.

对于 Windows 上的 Git 用户来说,一个非常酷的附加组件是 PoSHGit.它在 Powershell 命令行上提供命令自动完成功能.

A very cool add-on for Git users on Windows is PoSHGit. it provides command autocompletion on the Powershell commandline.

您是否体验过 VS 2013 GUI for Git?在没有命令行界面的情况下,这足以支持基本的分支/合并吗?

Have you experienced in the VS 2013 GUI for Git? Is that enough to support basic branching/merging without the command line interface?

它具有基本操作所需的一切.但是您确实需要能够可视化不同的分支以了解发生了什么.由于 Git 服务器和本地存储库只是 Git,因此任何 git 客户端都可以帮助您.SourceTree 是这里的一个选项.用于 Windows 客户端的 Git 是另一个.

It has all you need for basic operations. But you do need to be able to visualize the different branches to know what's going on. Since the Git server and local repo are just Git, any git client can help you out here. SourceTree is an option here. The Git for Windows client is another.

对于标准操作、签入、签出、合并、分支(或推送、拉取、获取、提交、合并),UI 工作正常.

For standard operations, check-in, check-out, merge, branch (or push, pull, fetch, commit, merge) the UI works just fine.

是否有详细的 Git 启动指南显示 Git 与 VS 2013 一起使用?MS 有一个将现有 Git 存储库集成到 VS 2013 的视频,但我正在寻找从头开始使用 Git 和 VS 2013 的视频?

Is there a detailed start-up guide for Git that shows Git being used with VS 2013? MS has a video for integrating an existing Git repo into VS 2013, but I'm looking for a start from scratch with Git and VS 2013?

在许多地方都可以使用 Git 开始......这些是一些选项:

Starting with Git is available in a number of places... These are a few options:

其他好读物:

还有一些值得安装的工具:

And a few tools worth installing: