简体   繁体   English

Azure DevOps 将 TFS 项目迁移到同一个 Git 存储库

[英]Azure DevOps migrate TFS projects to same Git repository

On TFS/TFVC I have this project with these branches:在 TFS/TFVC 上,我有以下分支的项目:

|_ProjectAbc
    |__ProjectAbc_Main
    |__ProjectAbc_Dev

Now I'm migrating all my TFS projects to Git using the Azure DevOps Portal.现在,我正在使用 Azure DevOps 门户将我所有的 TFS 项目迁移到 Git。

There I click on "Import Repository" and choose to import from TFVC.在那里我单击“导入存储库”并选择从 TFVC 导入。 At this is all fine.在这一切都很好。

在此处输入图片说明

But the "Import Repository" don't recognise and separate the branches.但是“导入存储库”不识别和分隔分支。

My idea is to create a Git repository by importing the ProjectAbc_Main branch to be the master and then create a branch based on master to be my DEV branch.我的想法是通过导入ProjectAbc_Main分支作为master ,然后创建一个基于master的分支作为我的DEV分支来创建一个 Git 存储库。

But I want to import my TFS ProjectAbc_Dev branch to my Git DEV branch and include all the history too.但是我想将我的 TFS ProjectAbc_Dev分支导入到我的 Git DEV分支并包含所有历史记录。

How can I do that?我怎样才能做到这一点?

I can change my Git DEV branch with the TFS ProjectAbc_Dev branch and then sync the branch, but with this I loose my ProjectAbc_Dev history and I want to keep the history.我可以使用 TFS ProjectAbc_Dev分支更改我的 Git DEV分支,然后同步该分支,但是这样我丢失了我的ProjectAbc_Dev历史记录,我想保留历史记录。

Any idea?任何的想法?

That's not possible with AzureDevOps migration tool that support only simple cases.对于仅支持简单案例的 AzureDevOps 迁移工具,这是不可能的。

You should use a tool like git-tfs to be able todo that: https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md#fetch-all-the-history-for-all-branches你应该使用像git-tfs这样的工具来做到这一点: https : //github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md#fetch-all-the-history -for-all-branch

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

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