简体   繁体   English

从使用 tfvc 的大型 tfs 代码库迁移到仍然使用 tfs 后端的 git

[英]Migration from large tfs codebase using tfvc to using git still with tfs backend

The organisation I work for are wanting to migrate their current code base from TFS (using TFVC) to Git but with the entire code base still residing in TFS.我工作的组织希望将他们当前的代码库从 TFS(使用 TFVC)迁移到 Git,但整个代码库仍驻留在 TFS 中。 This needs to incorporate the developers who currently (majority) utilise Visual Studio 2010. We have explored options of using git plugins, git-tfs/git-tf command line tools but still without a definitive answer or a best approach to this.这需要纳入目前(大多数)使用 Visual Studio 2010 的开发人员。我们已经探索了使用 git 插件、git-tfs/git-tf 命令行工具的选项,但仍然没有明确的答案或最佳方法。 Essentially, Is there a way to successfully migrate from the two - without the need of copying the large code base (distributed style system with local copy of repo - which would be 30GB+ - not feasible on their VMs), and using the Visual Studio GUI tools for Git?从本质上讲,有没有一种方法可以成功地从两者迁移 - 无需复制大型代码库(分布式样式系统具有本地 repo 副本 - 这将是 30GB + - 在他们的 VM 上不可行),并使用 Visual Studio GUI Git 的工具? If anyone has any ideas or opinions on this that would be a great help.如果有人对此有任何想法或意见,那将是一个很大的帮助。

To achieve what you want, you have to migrate your TFVC team projects to Git team projects in TFS (require TFS 2013 or above version).为了实现你想要的,你必须将你的 TFVC 团队项目迁移到 TFS 中的 Git 团队项目(需要 TFS 2013 或更高版本)。 The steps would be as below:步骤如下:

  1. Create a new Team Project with GIT as version control in TFS.在 TFS 中使用 GIT 作为版本控制创建一个新的团队项目。

  2. Use git-tf tool to clone all the projects to your local machine from TFVC Team Project:使用git-tf工具将所有项目从 TFVC Team Project 克隆到本地机器:

The optional --deep flag may be used to clone each TFS changeset for the specified path into the new Git repo.可选的 --deep 标志可用于将指定路径的每个 TFS 变更集克隆到新的 Git 存储库中。 If you don't need history, you can ignore this flag.如果您不需要历史记录,则可以忽略此标志。

git tf clone http://myserver:8080/tfs/collectionName $/TeamProject [--deep]
  1. Use GIT BASH to push the cloned TFVC team project to the Git repository on TFS:使用GIT BASH将克隆的 TFVC 团队项目推送到 TFS 上的 Git 存储库:

> >

Git remote add http://TFSServerName:port/tfs/Collectionname/_git/GITRepositoryName

Git push origin master

Detailed steps you can refer to this article:详细步骤你可以参考这篇文章:

https://blogs.msdn.microsoft.com/tfssetup/2015/05/19/migrating-a-tfvc-team-project-to-a-git-team-project-along-with-changeset-history-in-tfs/ https://blogs.msdn.microsoft.com/tfssetup/2015/05/19/migrating-a-tfvc-team-project-to-a-git-team-project-along-with-changeset-history-in- tfs/

After you migrate the TFVC team projects to Git team projects, you can install Visual Studio 2013 or Visual Studio 2015 to start using Git in Visual Studio .将 TFVC 团队项目迁移到 Git 团队项目后,您可以安装 Visual Studio 2013 或 Visual Studio 2015 以 开始在 Visual Studio 中使用 Git

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

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