我把Git介绍给了我的开发团队,除了我之外,每个人都讨厌它。他们想要取代 它与Team Foundation Server。我觉得这是一个巨大的倒退,尽管我不是很熟悉TFS。有经验的人能比较一下TFS和Git上的分支支持吗?另外,总的来说,TFS的优点和缺点是什么?之后我会讨厌它吗 使用Git几年?
当前回答
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.
其他回答
我想是声明
每个人都讨厌它,除了我
这就浪费了进一步的讨论:当你继续使用Git时,如果出现任何问题,他们都会责怪你。
除此之外,对我来说,Git比集中式VCS有两个优势,这是我最欣赏的(Rob Sobers部分描述过):
整个回购的自动备份:每次有人从中央回购中提取数据时,他/她都会获得完整的历史更改。当一个回购丢失时:别担心,在每个工作站都带上一个。 离线回购访问:当我在家里(或在飞机或火车上)工作时,我可以看到项目的完整历史,每一个签入,而不需要启动我的VPN连接来工作,并且可以像我在工作时一样工作:签入,签出,分支,任何事情。
但正如我所说:我认为您正在打一场失败的战斗:当每个人都讨厌Git时,就不要使用Git。这可以帮助你了解他们为什么讨厌Git,而不是试图说服他们。
如果他们只是因为这对他们来说是新事物而不想要它,并且不愿意学习新内容,那么你确定你能与这些员工一起成功开发游戏吗?
真的每个人都讨厌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将添加到您的解决方案中的所有辅助文件(.vssscc)来“支持”TFS -我们最近遇到了这些文件最终映射到错误的分支的问题,这导致了一些有趣的调试…
Git的整个分布式功能真的非常棒。它提供了shelsets(在当前产品中)没有的一些特性,比如本地回滚和提交选项(比如Eclipse的本地历史特性)。您可以使用开发人员分支来缓解这种情况,但老实说,许多开发人员一点也不喜欢分支和合并。我经常被要求在TFS中打开旧式的“独占签出”功能(并且每次都拒绝它)。
我认为许多大型企业都很害怕允许开发人员将整个历史带到本地工作区并随身携带(例如给新雇主)……偷一张快照是不好的,但拿走整段历史就更麻烦了。(并不是说你不能从TFS得到你想要的完整历史)…
上面提到,这是一种很好的备份方式,这对于开源来说也是很好的,因为原来的维护者可能会停止关心并删除他的版本,但对于企业计划来说,这对于许多企业来说还是不够,因为没有明确的责任分配来保存备份。而且,如果主“项目”以某种方式消失了,就很难弄清楚该使用哪个版本。它倾向于指定一个存储库作为主导/中心。
我最喜欢Git的是Push/Pull选项,在这里你可以轻松地为项目贡献代码,而不需要拥有提交权限。我猜您可以在TFS中使用非常有限的用户和搁置集来模拟这一点,但它没有Git选项那么强大。跨团队项目的分支可能也可以,但从管理的角度来看,这对许多组织来说并不可行,因为添加团队项目会增加大量的管理开销。
我还想在非源代码控制领域补充一些内容。工作项跟踪、报告和构建自动化(包括实验室管理)等特性极大地受益于中央领先的存储库。当您使用纯分布式模型时,这将变得更加困难,除非您使其中一个节点领先(从而返回到较少分布式的模型)。
随着TFS Basic与TFS 11一起推出,在TFS 12+时代,可以将本地TFS Basic同步到中央TFS的分布式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提供的一站式目标。
推荐文章
- VS 2017 Git本地提交数据库。每次提交时锁定错误
- 如何在过去的一些任意提交之间注入一个提交?
- 从GitHub克隆项目后拉git子模块
- GitHub上的分叉和克隆有什么区别?
- 递归地按模式添加文件
- 我如何使用notepad++(或其他)与msysgit?
- 如何将现有的解决方案从Visual Studio 2013添加到GitHub
- Git存储库中的悬垂提交和blob是什么?它们来自哪里?
- 我如何简单地从我最新的git提交创建一个补丁?
- Git显示“警告:永久添加到已知主机列表”
- 我如何检索一个回购的远程git地址?
- 如何列出提交,因为某些提交?
- 如何在不位于存储库的情况下执行Git命令?
- 为什么git在Windows下记不住我的密码
- 我如何得到bash完成工作与别名?