简体   繁体   English

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

[英]What are the big differences between TFVC (TFS Version Control) and Git for source control when using Visual Studio 2013?

There are tons of questions and answers about Git versus TFVC Source Control, but no current answers cover the integration of Git into Team Foundation Server/Service that I can find.有大量关于 Git 与 TFVC 源代码控制的问题和答案,但目前没有答案涵盖我能找到的将 Git 集成到 Team Foundation Server/Service 的问题。

I'm starting green pasture development using a wide variety of languages (C#, C++, PHP, Javascript, MySSQL) using Visual Studio 2013. In the future, there will be some iOS development.我正在使用 Visual Studio 2013 开始使用各种语言(C#、C++、PHP、Javascript、MySSQL)进行绿色牧场开发。将来,会有一些 iOS 开发。 I'm very familiar with SVN, VSS and TFVC for source control.我非常熟悉用于源代码控制的 SVN、VSS 和 TFVC。 However, I have never used Git.但是,我从未使用过 Git。 I prefer TFS for process management/agile development... It's not perfect, but it integrates well into Visual Studio.我更喜欢使用 TFS 进行流程管理/敏捷开发......它并不完美,但它可以很好地集成到 Visual Studio 中。

So, to help me decide between these two systems...所以,为了帮助我在这两个系统之间做出决定......

What are the big differences between TFVC and Git for source control when using Visual Studio 2013?使用 Visual Studio 2013 时,TFVC 和 Git 之间用于源代码控制的最大区别是什么?

  • Is the only benefit in my case a local repository (not saying that it's insignificant) and iOS development support?在我的情况下,唯一的好处是本地存储库(不是说它微不足道)和 iOS 开发支持?
  • Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).命令行界面是 Git 的唯一缺点(有些人认为这不是缺点;-P)。
  • Have you experienced in the Visual Studio 2013 GUI for Git?您是否体验过 Visual Studio 2013 GUI for Git? Is that enough to support basic branching/merging without the command line interface?在没有命令行界面的情况下,这足以支持基本的分支/合并吗?
  • Is there a detailed start-up guide for Git that shows Git being used with Visual Studio 2013?是否有详细的 Git 启动指南显示 Git 与 Visual Studio 2013 一起使用? Microsoft has a video for integrating an existing Git repository into Visual Studio 2013, but I'm looking for a start from scratch with Git and VS 2013. Microsoft 有一个将现有 Git 存储库集成到 Visual Studio 2013 的视频,但我正在寻找从头开始使用 Git 和 VS 2013 的方法。

I am not looking for a book here, but just a few bullet points and maybe some relevant links from folks that have used both TFVC and Git.我不是在这里寻找一本书,而只是一些要点和一些使用过 TFVC 和 Git 的人的相关链接。

Update更新

Since 2013 a lot has happened:自 2013 年以来,发生了很多事情:

  • Microsoft has added ssh support to Team Foundation Server, Azure DevOps Server and Azure DevOps.微软已经为 Team Foundation Server、Azure DevOps Server 和 Azure DevOps 添加了 ssh 支持。
  • Visual studio 2019 16.8+ ships with a completely revamped git client. Visual Studio 2019 16.8+ 附带一个完全改进的 git 客户端。
  • Microsoft has moved its own internal products off of TFVC.微软已经将自己的内部产品从 TFVC 中移除。 Windows and Office sources now live in Git in Azure DevOps. Windows 和 Office 源现在位于 Azure DevOps 中的 Git 中。
  • Microsoft has bought GitHub which is now the main focus for DevOps related offerings, many people who contributed to Azure DevOps have moved to GitHub as a consequence.微软已经购买了 GitHub,它现在是 DevOps 相关产品的主要焦点,许多为 Azure DevOps 做出贡献的人因此转移到了 GitHub。
  • Virtual File System for Git & Git Large File System have resolved many of the reasons why people stayed on TFVC. Git 虚拟文件系统和 Git 大文件系统解决了人们留在 TFVC 上的许多原因。
  • Azure DevOps has a built-in migration tool which can convert (part of) your TFVC history into a git repo. Azure DevOps 有一个内置的迁移工具,可以将你的(部分)TFVC 历史转换为 git 存储库。

In all this time very little happened for TFVC:在这段时间里,TFVC 几乎没有发生什么:

  • YAML pipelines have yet to receive TFVC support 2 years after their introduction (I'm not expecting these at all). YAML 管道在推出 2 年后尚未获得 TFVC 支持(我根本不期待这些)。
  • Team Explorer is now called "Legacy" in Visual Studio团队资源管理器现在在 Visual Studio 中称为“旧版”
  • TFVC has been declared feature complete TFVC 已被声明为功能完成
  • TFVC support for Eclipse and Visual Studio Code and Linux/Mac are officially deprecated/end-of-life.对 Eclipse 和 Visual Studio Code 以及 Linux/Mac 的 TFVC 支持已正式弃用/终止。

It's pretty clear who has won: Git.很明显谁赢了:Git。


What are the big differences between TFS and Git for source control when using VS 2013?使用 VS 2013 时,TFS 和 Git 在源代码控制方面的最大区别是什么?

MSDN has a very extensive page on all the features and differences between Team Foundation Version Control and Git . MSDN 有一个非常详尽的页面,介绍了 Team Foundation 版本控制和 Git 之间的所有功能和差异

Is the only benefit in my case a local repository (not saying that's insignificant) and IoS development support?在我的情况下,唯一的好处是本地存储库(不是说这是微不足道的)和 IoS 开发支持吗?

No, there's lot more, but they're often advanced scenario's of Git.不,还有更多,但它们通常是 Git 的高级场景。 Local Repo, offline support and full local fidelity on history is incredibly powerful, you get that out of the box with Visual Studio.本地存储库、离线支持和完整的本地历史保真度非常强大,您可以使用 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.我建议您查找Pro Git 书籍 Git in TFS is just another git server, it has pretty much all features that the standard Git has. TFS 中的 Git 只是另一个 git 服务器,它具有标准 Git 的几乎所有功能。

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.在合并之前重写历史记录的能力允许您删除或合并一些较小的更改集,从而使历史记录更清晰,更容易作为人类阅读。

Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).命令行界面是 Git 的唯一缺点(有些人认为这不是缺点;-P)。

TFVC has a command line too, people just don't use it. TFVC 也有命令行,只是人们不使用它。 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 并且永远不会比 TFVC 做得更多的人来说,他们可能真的不需要离开 UI,但他们不会获得很多很酷的功能......

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.如果你在做事情的时候不花时间学习 git 做什么,那么你就不会太难了。 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.像 Rebase 和 Squash 这样的东西真的很强大,可以创建一个非常干净的历史记录,但它会给人们留下一个问题,如果使用不当,它们就不能再合并了。 TFS has the ability to put some security settings to take away the rights to make very stupid decisions on a git repository . TFS 有能力进行一些安全设置,以剥夺在 git 存储库上做出非常愚蠢的决定的权利

A very cool add-on for Git users on Windows is PoSHGit .对于 Windows 上的 Git 用户来说,一个非常酷的附加组件是PoSHGit it provides command autocompletion on the Powershell commandline.它在 Powershell 命令行上提供命令自动完成功能。

Have you experienced in the VS 2013 GUI for Git?您是否体验过 VS 2013 GUI for Git? Is that enough to support basic branching/merging without the command line interface?在没有命令行界面的情况下,这足以支持基本的分支/合并吗?

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.由于 Git 服务器和本地存储库只是 Git,因此任何 git 客户端都可以帮助您。 SourceTree is an option here. SourceTree 是这里的一个选项。 The Git for Windows client is another.用于 Windows 客户端的 Git 是另一个。

For standard operations, check-in, check-out, merge, branch (or push, pull, fetch, commit, merge) the UI works just fine.对于标准操作、签入、签出、合并、分支(或推送、拉取、获取、提交、合并),UI 工作得很好。

Is there a detailed start-up guide for Git that shows Git being used with VS 2013?是否有详细的 Git 启动指南显示 Git 与 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? MS 有一个将现有 Git 存储库集成到 VS 2013 的视频,但我正在寻找从头开始使用 Git 和 VS 2013 的视频?

Starting with Git is available in a number of places... These are a few options:许多地方都可以从 Git 开始……这些是一些选项:

Other good reads:其他好读:

And a few tools worth installing:还有一些值得安装的工具:

To clear up some confusing mixed terminology that is used a lot with TFS澄清一些在TFS 中经常使用的令人困惑的混合术语

Team Foundation Server (TFS) is an application life cycle management tool, which includes a source version control system (VCS) component. Team Foundation Server (TFS)是一个应用程序生命周期管理工具,其中包括一个源版本控制系统 (VCS)组件。

The VCS component that TFS uses is primarily Team Foundation Version Control (TFVC) TFS使用VCS组件主要是Team Foundation Version Control (TFVC)

So, the question would be TFVC vs Git所以,问题是TFVCGit

(In fact, TFS supports Git as a VCS option.) (事实上​​, TFS支持Git作为VCS选项。)

So, the question is: TFVC vs Git所以,问题是:TFVC vs Git

jessehouwing has a great answer that covers this in good detail, so please reference that jessehouwing 有一个很好的答案,详细介绍了这一点,所以请参考

As far as choosing which to use, in my opinion Git wins至于选择使用哪个,在我看来Git胜出

  1. It is lightweight: Simple to setup and start using.它是轻量级的:易于设置和开始使用。
  2. It's distributed nature means it is very resilient to disasters, someone will always have a copy of the repo.它的分布式特性意味着它对灾难非常有弹性,总有人会拥有一份 repo 的副本。
  3. Offline work is simple, you are working with your own full repository.离线工作很简单,您正在使用自己的完整存储库。 You can commit changes, revert, browse history, etc. You only need to be online when you wish to sync with a remote repository.您可以提交更改、还原、浏览历史记录等。您只需要在希望与远程存储库同步时在线。
  4. In TFS there is no simple way to save the state of your changes (file additions, modifications, file deletions), and switch to another state of code.在 TFS 中,没有简单的方法来保存更改的状态(文件添加、修改、文件删除),并切换到另一种代码状态。 (For example, to work on two features and switch back and forth). (例如,处理两个功能并来回切换)。 In git, you simply checkout a different branch.在 git 中,您只需签出一个不同的分支。

Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).命令行界面是 Git 的唯一缺点(有些人认为这不是缺点;-P)。

If you're uncomfortable with the command line interface, there are multiple GUI frontends available for Git.如果您对命令行界面感到不舒服,Git 有多个 GUI 前端可用。 Git itself actually contains repository browser GUI tool called gitk and git-gui - a GUI for git. Git 本身实际上包含名为gitkgit-gui存储库浏览器 GUI 工具gitk的 GUI。 Then there are third-party apps such as git-cola , TortoiseGit and others .然后是git-colaTortoiseGit第三方应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio的源代码控制未提示就从TFVC切换到Git - Source control for Visual Studio gets switched from TFVC to Git unprompted 在visual studio中切换Git和TFS源代码控制 - Switch between Git and TFS source control in visual studio 带有git和VS 2013的Visual Studio Online的哪些源代码控制提供程序 - What source control provider for Visual Studio Online with git and VS 2013 TFS(TFVC)的Git等效项与Visual Studio中的Workspace版本进行比较 - Git equivalent for TFS (TFVC) Compare with Workspace Version in Visual Studio 将 Visual Studio Online 团队项目源代码管理从 TFVC 更改为 Git - Change Visual Studio Online team project source control from TFVC to Git 与带有源代码控制的Git的Visual Studio 2013中的“我的作品”等效 - Equivalent of “My Work” in Visual Studio 2013 with Git for source control 将现有Visual Studio 2013项目添加到Git源代码管理 - Adding Existing Visual Studio 2013 Projects to Git source control Visual Studio 2013 Git源代码控制文件是只读的吗? - Visual Studio 2013 Git Source Control Files Read Only? Visual Studio 2013 Git版本控制 - SSH密钥 - Visual Studio 2013 Git Version Control - SSH Key 应该将哪些Visual Studio 2013项目文件检入源代码管理? - What Visual Studio 2013 project files should be checked into source control?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM