git-tf 和 git-tfs 有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12866832/
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
What's the difference between git-tf and git-tfs?
提问by Earlz
I've recently been getting really fed up with TFS. I've heard that there is a light at the end of the tunnel though. Apparently I can use either git-tf or git-tfs and treat my code as if it was managed by git, but be able to push/pull to/from a central TFS server.
我最近真的厌倦了 TFS。我听说隧道尽头有灯。显然,我可以使用 git-tf 或 git-tfs 并将我的代码视为由 git 管理,但能够向/从中央 TFS 服务器推送/拉取。
My main question is I'm not sure which one of these I should use. There is git-tf which is officially supported by Microsoft, and there is git-tfs which has been around a lot longer. What's the differences between these and which should I try out first?
我的主要问题是我不确定我应该使用其中的哪一个。有微软官方支持的 git-tf,还有已经存在很久的 git-tfs。这些之间有什么区别,我应该先尝试哪个?
回答by Edward Thomson
Disclaimer: I started the git-tf
projectand although the project is now in very capable hands without me as a frequent contributor, you should absolutely consider my opinions on this to be stronglybiased. (And, assuming you're on Windows, perhaps unexpected.)
免责声明:我开始了这个git-tf
项目,尽管在没有我频繁贡献的情况下,该项目现在已经掌握在非常有能力的人手中,但你绝对应该认为我对此的看法有很大的偏见。(而且,假设您使用的是 Windows,这可能是出乎意料的。)
There are two fundamental differences between the two tools:
这两种工具之间有两个根本区别:
git-tfs
was built for Windows users and written on top of the .NET TFS SDK. The TFS SDK will notrun under Mono, so this makesgit-tfs
unsuitable for cross-platform use.git-tf
was built for cross-platform users and written on top of the Java TFS SDK. Thus, it will run anywhere that's supported by the Java TFS SDK (Windows, Mac, Linux, AIX, HP-UX, Solaris, etc...)git-tf
was explicitly created to allow Xcode users to access TFS.
git-tfs
是为 Windows 用户构建的,基于 .NET TFS SDK 编写。TFS SDK不会在 Mono 下运行,因此git-tfs
不适合跨平台使用。git-tf
是为跨平台用户构建的,并基于 Java TFS SDK 编写。因此,它将在 Java TFS SDK(Windows、Mac、Linux、AIX、HP-UX、Solaris 等)支持的任何地方运行,git-tf
明确创建以允许 Xcode 用户访问 TFS。
On Windows, of course, you can use either. I'm not going to necessarily say one is better than the other. But I will say:
当然,在 Windows 上,您可以使用任何一种。我不一定会说一个比另一个好。但我会说:
Mybiggest complaint about
git-tfs
is that it won't work on Mac OS. If there was a way to makegit-tfs
cross-platform, thengit-tf
almost certainly wouldn't exist.git-tfs
is fasterin some cases thangit-tf
. Performance was notour priority in the first few revisions, correctness was.Because
git-tf
has a wide platform support matrix, this means that its functionality is necessarily constrained. For example, there is noUI.git-tfs
, on the other hand, has acheckintool
command that will open the normal TFS Checkin dialog. This can be exceptionally helpful in visualizing your changes. (If I recall, you can open up a proper visual diff from there, etc.)git-tf
works by populating the git repository directly, downloading TFS objects directly into the git object database.git-tfs
works by creating a TFS working folder mapping in a hidden folder, then populating the git repository from that. There's a disk penalty here, so if you have superginormous repositories, you might feel this.git-tfs
can try to map your TFS branches to your git branches. A lot of people will see this as a positive forgit-tfs
, though I don't: git's branching model (at the repository level) and TFS's branching model (represented as folders in the repository) are so radically different as to cause problems in anything but the most simplistic workflows. But your mileage may vary.git-tfs
is actively developed by a community.git-tf
has not had the community adoption.
我最大的抱怨
git-tfs
是它不能在 Mac OS 上运行。如果有一种方法可以实现git-tfs
跨平台,那么git-tf
几乎肯定不会存在。git-tfs
是更快的在某些情况下比git-tf
。在最初的几次修订中,性能不是我们的首要任务,正确性才是。由于
git-tf
拥有广泛的平台支持矩阵,这意味着其功能必然受到限制。例如,没有用户界面。git-tfs
,另一方面,有一个checkintool
命令可以打开正常的 TFS Checkin 对话框。这对于可视化您的更改非常有帮助。(如果我记得,你可以从那里打开一个适当的视觉差异,等等。)git-tf
通过直接填充 git 存储库,将 TFS 对象直接下载到 git 对象数据库中来工作。git-tfs
通过在隐藏文件夹中创建 TFS 工作文件夹映射,然后从中填充 git 存储库来工作。这里有一个磁盘损失,所以如果你有超大的存储库,你可能会感觉到这一点。git-tfs
可以尝试将您的 TFS 分支映射到您的 git 分支。很多人会认为这对git-tfs
.最简单的工作流程。但是您的里程可能会有所不同。git-tfs
由社区积极开发。git-tf
还没有被社区采用。
I don't want to make it sound like I'm saying git-tf
is bad. It's not. I think it's actually pretty good. But it may not be your best choice.
我不想让它听起来像我说git-tf
的不好。它不是。我觉得其实还不错。但这可能不是您的最佳选择。
Update: git-tf
has reached end-of-life. It is no longer maintained or supported by Microsoft. We recommend git-tfs
if you want a bidirectional TFS <-> git solution.
更新:git-tf
已达到使用寿命。Microsoft 不再维护或支持它。git-tfs
如果您想要双向 TFS <-> git 解决方案,我们建议您。
回答by Philippe
Disclaimer: I am a developper on the git-tfs project
免责声明:我是 git-tfs 项目的开发人员
Edit: git-tf is no more maintained...
编辑:git-tf 不再维护...
Edit: git-tfs isn't actively maintainedanymore either.
编辑:git-tfs也不再积极维护。
And now, there is a very good support of TFS branching in git-tfs (fetching existing branches, creating branches, merge branches more easily than with TFS,... using branch
command).
现在,在 git-tfs 中对 TFS 分支有很好的支持(获取现有分支、创建分支、合并分支比使用 TFS 更容易,...使用branch
命令)。
See:
看:
- Managing branches with git-tfs
- git-tfs branch command documentation
- Another answer on stackoverflow on the subject
git-tfs is also perhaps the only tool that permit you to migrate from TFS(VC) to TFS(Git), managing workitems if needed, or plain git repository.
git-tfs 也可能是唯一允许您从 TFS(VC) 迁移到 TFS(Git)、在需要时管理工作项或普通 git 存储库的工具。
And some other good features...
还有其他一些不错的功能......
回答by J Jones
To anyone finding this thread:
对于找到此线程的任何人:
Git-TF
has been officially discontinued after not having been updated after 2013 and now explicitly suggests Git-TFS
as an alternative.
Git-TF
在 2013 年之后未更新后已正式停产,现在明确建议Git-TFS
作为替代方案。
Git-TF End-of-Life
Git-TF has reached its end-of-life. It will have no further updates and is no longer be supported by Microsoft.
Microsoft Visual Studio Team Services now provides a simple import tool to import a Team Foundation Version Control repository into a Git repository. We recommend that you use this to convert TFVC repositories to Git.
If you require more advanced conversion needs, or you want to bridge a TFVC repository and work with a local Git repository, we recommend the git-tfs project.
Git-TF should not be used for new projects, but it will remain on the Codeplex archive for legacy users.
Git-TF 生命周期结束
Git-TF 已达到其生命周期的终点。它将没有进一步的更新,并且不再受 Microsoft 支持。
Microsoft Visual Studio Team Services 现在提供了一个简单的导入工具,用于将 Team Foundation 版本控制存储库导入 Git 存储库。我们建议您使用它来将 TFVC 存储库转换为 Git。
如果您需要更高级的转换需求,或者您想桥接 TFVC 存储库并使用本地 Git 存储库,我们推荐 git-tfs 项目。
Git-TF 不应用于新项目,但它会保留在 Codeplex 存档中供旧用户使用。
(Section addedto the project's codeplex pagein April 2017 by Edward Thomson, its initiator and author of the accepted answer)
(该部分由 Edward Thomson 于 2017 年 4 月添加到项目的codeplex 页面,其发起者和已接受答案的作者)
Git-TFS
seems to be actively maintained:
https://github.com/git-tfs/git-tfs/commits/master
Git-TFS
似乎正在积极维护:https:
//github.com/git-tfs/git-tfs/commits/master