Git 和 Team Foundation Server

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/614245/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 06:14:08  来源:igfitidea点击:

Git and Team Foundation Server

gittfs

提问by Christian Deger

Update:I don't use TFS anymore. But from the comments I can see that git-tfsis obviously the way to go nowadays.

更新:我不再使用 TFS。但是从评论中我可以看出git-tfs显然是当今要走的路。

Has anybody experience using Git as an offline solution for Team Foundation Server?

有没有人使用 Git 作为 Team Foundation Server 的离线解决方案?

For Subversion you could use git-svn to keep a private repository with a svn backend.

对于 Subversion,您可以使用 git-svn 来保留带有 svn 后端的私有存储库。

I tried to use SvnBridgeand git-svn to work with TFS. At first it looked promising but Visual Studio recognizes the solution as being under TFS version control and interferes during commit.

我尝试使用SvnBridge和 git-svn 来处理 TFS。起初它看起来很有希望,但 Visual Studio 认为该解决方案受 TFS 版本控制并在提交期间发生干扰。

Are there other ways to combine those two?

还有其他方法可以将这两者结合起来吗?

回答by Matt Burke

I've started working on a tool called git-tfs, similar in some ways to git-svn.

我已经开始研究一个名为 git-tfs 的工具,它在某些方面类似于 git-svn。

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

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

回答by vossad01

A new offering from Microsoft: Git-tf

微软的新产品:Git-tf

Announcement: Announcing Git Integration with TFS

公告:宣布将 Git 与 TFS 集成

Download: here

下载:这里

Source (CodePlex): here

来源(CodePlex):这里

回答by jonnii

I'm sure it's possible, but it's going to be very rube goldberg-ian in its construction and will most likely lead to more pain than pleasure. I suggest picking a source control system and going with it.

我敢肯定这是可能的,但它的结构将非常像戈德堡,并且很可能会导致更多的痛苦而不是快乐。我建议选择一个源代码控制系统并使用它。

If you need real offline support then git is awesome, but windows support is still a bit flakey.

如果你需要真正的离线支持,那么 git 很棒,但 Windows 支持仍然有点古怪。

回答by Rob

We just decided to do this at work. Here is a blog post about how we did it.

我们只是决定在工作中这样做。这是一篇关于我们如何做到的博客文章。

http://blog.lozanotek.com/archive/2009/10/20/git-svn_SvnBridge_and_TFS_Source_Control.aspx

http://blog.lozanotek.com/archive/2009/10/20/git-svn_SvnBridge_and_TFS_Source_Control.aspx

Just found this project on Github too.. this might work but I have not tried it yet.

刚刚在 Github 上也发现了这个项目.. 这可能有效,但我还没有尝试过。

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

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

回答by Rob

I can tell you it is possible...

我可以告诉你这是可能的...

Also here you can find some minor details about someone with the same experience: http://blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/

同样在这里你可以找到一些有相同经历的人的小细节:http: //blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/

回答by Sardaukar

Slightly off-topic to your question, but I have written a Powershell script that converts a TFS repository to a Git one. Might also be useful.

您的问题有点偏离主题,但我编写了一个 Powershell 脚本,可将 TFS 存储库转换为 Git 存储库。可能也有用。

See my Github repo for the script

有关脚本,请参阅我的 Github 存储库

回答by Octavio Licea

TFS supports git now: tfs news git support

TFS 现在支持 git: tfs news git support

回答by Ed Blankenship

Brian Harry goes through some great detail about the new integration of Git repositoriesinto the Team Foundation Serviceas well as Team Foundation Server 2013. There are quite a few interesting points he makes that are particularly important to enterprise and generally for teams who care about having a solid hosting of their Git repos:

Brian Harry 详细介绍了Git 存储库Team Foundation Service以及Team Foundation Server 2013新集成。他提出了很多有趣的观点,它们对企业特别重要,通常对于关心他们的 Git 存储库的可靠托管的团队来说:

Ease of installation– We've now made installing Git a seamless part of installing TFS. There's nothing to go and track down and download. Nothing to install and configure separately. You just install TFS 2013 and automatically get Git support.

Support and servicing– Because we are shipping it, we support it. This means if you have any problem, you can contact our support and get help. You will receive security updates, hot fixes, regular Updates and more all the same way you are used to getting them. We'll work hard to make sure your TFS Server is healthy and up to date regardless of which features you are using.

High availability– Since early on, we've worked to make TFS support high availability. Our Git support is no exception – we support all the same things you are used to with TFS – load balancing and clustering to ensure that your server will continue to run in spite of hardware and software failures, Geo-replication if you need to be certain that you maintain business continuity even in the face of regional outages, online backup and restore as an integrated part of TFS so that your existing enterprise grade backup and restore policies (full, incremental and transaction log) will continue to work (giving you good RTO and RPO).

Scale– Like with TFS, you can scale your TFS installation seamlessly as your needs grow. This includes scaling out both the application tier and the storage tier as you need to add additional capacity.

Ease of management– Our Git implementation is fully integrated in to TFS so that all of your management policies can continue unchanged – service account management, hardware migration, software patching, backup & restore, monitoring, permission management and more.

Integrated Authentication– Our Git support fully integrates Windows Active Directory authentication so that all of your access control, auditing, etc can be done against a consistent and manageable infrastructure. As part of this, all changes are audited against an authorized identity assuring you know who made each change.

Enhanced permissions– We've built (and are building) a bunch of additional repository and permission management capabilities that allow administrators to “control the chaos”. The first set include the ability to manage repositories (create, delete, rename, etc) and repository level permissions that control Read, Write and Administer permissions. We also include a 4th permission that addresses a key issue many customers have had with Git – “Force push”, which effectively enables users to “alter history”. While we enable this ability, we also enable administrators to disable it with a permission. We are also working on additional permissions now – like branch level permissions that will enable administrators to control who can create, delete and use individual branches. In this way, developers can use branching any way they choose locally but, when they are going to push back to the master repo, they are constrained by policies the administrator configures.

ALM integration– And, of course, we are fully integrating Git into the TFS ALM workflows – work item tracking, build automation, reporting, code review, and more. Not all of that integration is complete yet but we'll be fleshing it out through the 2013 Updates and, when we are done, we should have full parity on ALM integration capabilities between Team Foundation Version Control and Git Version Control.

Localization– Like the rest of our product, our Git capabilities will be localized into the same languages as the rest of VS making it more approachable by parts of the non-English speaking world.

易于安装——我们现在已经让安装 Git 成为安装 TFS 的无缝部分。没有什么可去追踪和下载的。无需单独安装和配置。您只需安装 TFS 2013 并自动获得 Git 支持。

支持和服务——因为我们在运送它,所以我们支持它。这意味着如果您有任何问题,您可以联系我们的支持并获得帮助。您将收到安全更新、修补程序、定期更新等,所有这些都与您习惯的获取方式相同。无论您使用哪些功能,我们都将努力确保您的 TFS 服务器健康且最新。

高可用性——从很早开始,我们就一直致力于让 TFS 支持高可用性。我们的 Git 支持也不例外——我们支持您使用 TFS 所习惯的所有相同的东西——负载平衡和集群以确保您的服务器在硬件和软件故障的情况下继续运行,如果您需要确定地理复制即使面临区域中断,您也能保持业务连续性,在线备份和恢复是 TFS 的一个组成部分,这样您现有的企业级备份和恢复策略(完整、增量和事务日志)将继续工作(为您提供良好的 RTO和 RPO)。

规模-比如带TFS,你可以扩展你的TFS无缝安装在您的需求增长。这包括在需要添加额外容量时扩展应用程序层和存储层。

易于管理——我们的 Git 实施完全集成到 TFS 中,因此您的所有管理策略都可以保持不变——服务帐户管理、硬件迁移、软件修补、备份和恢复、监控、权限管理等等。

集成身份验证——我们的 Git 支持完全集成了 Windows Active Directory 身份验证,因此您的所有访问控制、审核等都可以针对一致且可管理的基础架构进行。作为其中的一部分,所有更改都根据授权身份进行审核,确保您知道每个更改是谁进行的。

增强的权限– 我们已经构建(并且正在构建)一堆额外的存储库和权限管理功能,允许管理员“控制混乱”。第一组包括管理存储库(创建、删除、重命名等)和控制读取、写入和管理权限的存储库级别权限的能力。我们还包含了第四个权限,它解决了许多客户在使用 Git 时遇到的一个关键问题——“强制推送”,它有效地使用户能够“改变历史”。在我们启用此功能的同时,我们还允许管理员在获得许可的情况下禁用它。我们现在还在研究其他权限——比如分支级别的权限,这将使管理员能够控制谁可以创建、删除和使用单个分支。通过这种方式,

ALM 集成——当然,我们正在将 Git 完全集成到 TFS ALM 工作流中——工作项目跟踪、构建自动化、报告、代码等。并非所有集成都已完成,但我们将通过 2013 更新充实它,完成后,我们应该在 Team Foundation 版本控制和 Git 版本控制之间完全平等地使用 ALM 集成功能。

本地化——与我们产品的其余部分一样,我们的 Git 功能将被本地化为与 VS 的其余部分相同的语言,使其更容易被非英语世界的部分人所接受。

Source: Enterprise Grade Git Repos

来源: 企业级 Git 存储库

回答by Tan Le

I agree with Matt Burke said, I think http://git-tfs.comis your choice. But there some drawback:

我同意 Matt Burke 所说的,我认为http://git-tfs.com是你的选择。但是有一些缺点:

  • you have to commit 2 times, once in VS and once in Git console

  • if you want to link a changeset to some item, you have to do learn more about git-tfs statement (rcheckin,...)

  • 你必须提交 2 次,一次在 VS 中,一次在 Git 控制台中

  • 如果要将变更集链接到某个项目,则必须了解有关 git-tfs 语句的更多信息(rcheckin,...)