简体   繁体   English

从TFVC基于路径的分支过渡到Git

[英]Transition from TFVC Path-Based Branches to Git

We currently have one TFVC Repository with a lot of path-based branches at the folder levels. 当前,我们有一个TFVC存储库,在文件夹级别具有很多基于路径的分支。 For example, 例如,

TFVC_Repo
   Product A (Folder)
      Dev (Branch)
      Main (Branch)
   Product B (Folder)
      Dev (Branch)
      Main (Branch)

If we convert this repo into Git and want to maintain a somewhat similar structure, since Git doesn't have folder-level branches, is the only option creating multiple repos for each Product? 如果我们将此仓库转换为Git并希望保持某种相似的结构,因为Git没有文件夹级分支,那么唯一的选择是为每个产品创建多个仓库吗? So, we'll end up with: 因此,我们最终得到:

Git Repo Product A
      Dev (Branch)
      Master (Branch)
Git Repo Product B
      Dev (Branch)
      Master (Branch)

Thank you for any guidance you might have. 感谢您的指导。

TFVC branch and Git branch, even though the name is similar, but there have been many differences. TFVC分支和Git分支虽然名称相似,但是存在许多差异。

Are there similarities between TFVC and Git branch strategies? TFVC和Git分支策略之间有相似之处吗?

The TFVC Feature Isolation branching strategy is similar to the Git topic branches . TFVC特征隔离分支策略类似于Git 主题分支

You should select a branching strategy for Git when you plan your migration to Git. 在计划迁移到Git时,应该为Git选择分支策略

If you're currently using a long-lived feature branch strategy, it may be easiest to begin adopting feature flags before migrating to Git, so that you need to migrate as few branches as possible. 如果您当前使用的是功能很长的功能分支策略,那么在迁移到Git之前开始采用功能标记可能是最容易的,因此您需要迁移的分支越少越好。 Be sure to document the mapping between legacy branches and the new branches in Git so that your team understands where they should commit their new work. 确保在Git中记录旧分支和新分支之间的映射,以便您的团队了解他们应该在哪里提交新工作。

More details please take a look at this tutorial: Plan your migration to Git 更多详细信息,请查看本教程: 规划向Git的迁移

Besides, it's able to make branches to be created in folders with TFS GIT, please follow: Create a new branch from the web , just convenient to manage and only available with TFS 2017 above version. 此外,它还可以使用TFS GIT在文件夹中创建分支 ,请遵循以下步骤: 从Web创建新分支 ,方便管理,并且仅适用于TFS 2017以上版本。

在此处输入图片说明

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

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