简体   繁体   English

git-tfs:存储库如何存储文件?

[英]git-tfs: How is the repository storing files?

We have a large TFS repository which we would like to migrate to git. 我们有一个大型的TFS存储库,我们希望将其迁移到git。

We are considering using git-tfs for a while, in order for everything to continue working while we migrate. 我们正在考虑使用git-tfs一段时间,以便在迁移过程中一切都能继续工作。

We have large (or small, but rapidly changing) binary files scattered throughout the code, which have been checked-in to tfs throughout the history. 我们在代码中散布着大(或小,但变化迅速)的二进制文件,这些文件在整个历史记录中都已签入到tfs中。


My worries about git-tfs I have not been able to find accessible answers for: 我担心git-tfs,但无法找到以下答案:

  1. What is the source of truth for git-tfs? git-tfs的真实来源是什么? Is it a git server, a tfs server, or some hybrid, or none of the above? 它是git服务器,tfs服务器还是某种混合服务器,还是以上都不是?

  2. If it is a git server, how would this affect workflow while knowing binary files exist? 如果它是git服务器,那么在知道二进制文件存在的情况下,这将如何影响工作流程?

  3. We thought of using lfs , but not sure how this would play with git-tfs. 我们考虑使用lfs ,但不确定如何在git-tfs中使用。

I would love some light shed on this topic, as it would be quite pointless to migrate only to find out binary files make the new repo not usable. 我希望对此主题有所了解,因为仅查找二进制文件会使新存储库不可用而进行迁移将是毫无意义的。

  1. The Git-TFS tool is a two-way bridge between Team Foundation Version Control and Git, and can be used to perform a migration . Git-TFS工具是Team Foundation版本控制和Git之间的双向桥梁,可用于执行迁移

  2. It's not a git sever 这不是git服务器

  3. There are two totally different things without any relationship. 有两种完全不同的事物,没有任何关系。

This tool is similar to git-svn. 这个工具类似于git-svn。 It fetches TFS commits into a git repository, and lets you push your updates back to TFS. 它将TFS提交提取到git存储库中,并允许您将更新推回TFS。 In other words, you are using git repositories locally to source control your codes and after edits you could push back changes to remote TFVC repo. 换句话说,您正在本地使用git存储库来对代码进行源代码控制,并且在编辑后,您可以将更改推回远程TFVC存储库。 It do the trick to server, just feels like you are using local TFVC workspace as normal. 它起到了服务器的作用,就像您正常使用本地TFVC工作区一样。

Git-TFS is also appropriate if you want to attempt a migration with full history, more than the 180 days that the Import tool supports, or if you want to attempt a migration that includes multiple branches and merge relationships. 如果您想尝试具有完整历史记录,超过导入工具支持的180天的迁移,或者您想要尝试包含多个分支和合并关系的迁移,则Git-TFS也适用。

More details please take a look at this link: https://github.com/git-tfs/git-tfs 更多细节请看以下链接: https : //github.com/git-tfs/git-tfs


Due to the differences in how TFVC and Git store version control history, we recommend that you don't migrate your history. 由于TFVC和Git存储版本控制历史记录的方式不同,我们建议您不要迁移历史记录。 This is the approach that Microsoft took when it migrated Windows and other products from centralized version control to Git. 这是Microsoft将Windows和其他产品从集中版本控制迁移到Git时采用的方法。

We generally advise users to do a tip migration and keep their TFVC repository online but read-only to view history. 我们通常建议用户进行小技巧迁移,并使其TFVC存储库保持在线状态,但只读以查看历史记录。

You could also take a look at our official tutorial about how to-- Import repositories from TFVC to Git 您也可以看一下我们的官方教程- 从TFVC导入存储库到Git

We ended up using git tf , which is a product that is no longer supported. 我们最终使用了git tf ,该产品不再受支持。

The upside is, it worked. 好处是,它奏效了。

Unlike git-tfs which caused all kinds of problems: Binary files were migrated corrupt, not all history was migrated, and other anoying problems we did not want to solve. 与git-tfs引起的各种问题不同:二进制文件已损坏迁移,并非所有历史记录都已迁移,以及其他我们不想解决的麻烦问题。

We haven't tried lfs yet, but it may be necessary later. 我们还没有尝试过lfs,但是稍后可能需要。 At least we got to go through one incremental step for now. 至少我们现在必须经历一个增量步骤。

TL;DR: - git-tfs did not work for us. TL; DR: -git-tfs对我们不起作用。 git-tf did. git-tf做到了。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM