我把Git介绍给了我的开发团队,除了我之外,每个人都讨厌它。他们想要取代 它与Team Foundation Server。我觉得这是一个巨大的倒退,尽管我不是很熟悉TFS。有经验的人能比较一下TFS和Git上的分支支持吗?另外,总的来说,TFS的优点和缺点是什么?之后我会讨厌它吗 使用Git几年?


当前回答

如果您的团队使用TFS,而您想使用Git,那么您可能需要考虑“Git到TFS”的桥接。从本质上讲,您每天都在计算机上使用Git工作,然后当您想要将更改推送到TFS服务器时,您可以将它们推送到TFS服务器。

有一些(在github上)。我在上一个地方(和另一个开发人员一起)使用了一个,并取得了一些成功。看到的:

https://github.com/spraints/git-tfs

https://github.com/git-tfs/git-tfs

其他回答

对我来说,主要的区别是TFS将添加到您的解决方案中的所有辅助文件(.vssscc)来“支持”TFS -我们最近遇到了这些文件最终映射到错误的分支的问题,这导致了一些有趣的调试…

在对利弊进行了一番调查后,我所在的公司也决定采用TFS。不是因为GIT不是一个好的版本控制系统,而是最重要的是对于TFS交付的完全集成的ALM解决方案。如果版本控制特性很重要,那么选择GIT可能是最好的。然而,对于普通开发人员来说,陡峭的GIT学习曲线不可低估。

关于TFS作为一个真正的跨技术平台的详细解释,请参阅我的博客文章。

Original: @Rob, TFS has something called "Shelving" that addresses your concern about commiting work-in-progress without it affecting the official build. I realize you see central version control as a hindrance, but with respect to TFS, checking your code into the shelf can be viewed as a strength b/c then the central server has a copy of your work-in-progress in the rare event your local machine crashes or is lost/stolen or you need to switch gears quickly. My point is that TFS should be given proper praise in this area. Also, branching and merging in TFS2010 has been improved from prior versions, and it isn't clear what version you are referring to when you say "... from experience that branching and merging in TFS is not good." Disclaimer: I'm a moderate user of TFS2010.

Edit Dec-5-2011: To the OP, one thing that bothers me about TFS is that it insists on setting all your local files to "read-only" when you're not working on them. If you want to make a change, the flow is that you must "check-out" the file, which just clears the readonly attribute on the file so that TFS knows to keep an eye on it. That's an inconvenient workflow. The way I would prefer it to work is that is just automatically detects if I've made a change and doesn't worry/bother with the file attributes at all. That way, I can modify the file either in Visual Studio, or Notepad, or with whatever tool I please. The version control system should be as transparent as possible in this regard. There is a Windows Explorer Extension (TFS PowerTools) that allows you to work with your files in Windows Explorer, but that doesn't simplify the workflow very much.

如果您的团队使用TFS,而您想使用Git,那么您可能需要考虑“Git到TFS”的桥接。从本质上讲,您每天都在计算机上使用Git工作,然后当您想要将更改推送到TFS服务器时,您可以将它们推送到TFS服务器。

有一些(在github上)。我在上一个地方(和另一个开发人员一起)使用了一个,并取得了一些成功。看到的:

https://github.com/spraints/git-tfs

https://github.com/git-tfs/git-tfs

最重要的是(

https://stackoverflow.com/a/4416666/172109 https://stackoverflow.com/a/4894099/172109 https://stackoverflow.com/a/4415234/172109

), 这是正确的,TFS不仅仅是一个风险投资。TFS提供的一个主要特性是本机集成的错误跟踪功能。变更集与问题相关联,并且可以跟踪。支持各种签入策略,以及与Windows域的集成,这是运行TFS的人所拥有的。与Visual Studio紧密集成的GUI是另一个卖点,这吸引了鼠标和点击较少的开发人员及其经理。

因此,比较Git和TFS并不是一个合适的问题。正确的,尽管不切实际,问题是比较Git和TFS的VCS功能。在这一点上,Git将TFS踢出了水面。然而,任何严肃的团队都需要其他工具,这就是TFS提供的一站式目标。