vernou
vernou

Reputation: 7590

Unable to migrate TFVC to GIT from other collection of project

In Azure DevOps Server 2019 (on premise), we have one collection of project with one BIG project. But perfomance are really bad.

We want to split this BIG project in many little project :

I have a duplicated environnement to test. In the same organisation, I have created a collection of project 'Product1' with Git. In Azure DevOps with the tool Import from TFVC, I select TFVC, enter in Path $/BigProject/Team1/Product1/Main and uncheck Migrate with history. I am getting this error :

There is no item in the given path which can be imported

VSTS redirects me to https://go.microsoft.com/fwlink/?linkid=839462 but there is no description of this error, it's a general import guide.

I think I need precise the collection in the path. Then I try :

Collection/BigProject/Team1/Product1/Main
$Collection/BigProject/Team1/Product1/Main
/Collection/BigProject/Team1/Product1/Main

But I have the same error.

I know we can manually migrate like Unable to perform TFVC to GIT import on VSTS and I will do this for my team. But for the other teams, it would be better to have a simple tool.

How can I import in Git project, a TFVC project in other collection with the tool Import from TFVC?

Upvotes: 2

Views: 2553

Answers (2)

jessehouwing
jessehouwing

Reputation: 114461

While it's true that you can only import from within the same collection, it is very easy to migrate a whole git repo from one collection to another.

So the trick here is:

  • Use the Import feature to import the data from TFVC to a git repo in the source project.

    enter image description here

  • Take the clone URL from the source project enter image description here

    enter image description here

  • Go to the target project and choose to import a git repository into that project and point it to the repo in the source project. I used a Personal Access Token to auth, but you may need to generate and use another kind of alternate creds.

    enter image description here

This will work just fine. The git repo will be cloned with all details and history. The portability of Git makes this a seamless process.It works from one TFS Server to another, but also from any other Git Provider or Azure DevOps Services.

Notice

While splitting your collection into multiple collections will make your TFS instance more manageable, it will create some limitations should you want to migrate to Azure DevOps in the cloud later. Each collection will turn into a separate account upon import. So if you want a single account in the future, the recommendation is to stay in a single Project Collection. Azure DevOps Service doesn't have the concept of a collection.

A single Team Project can hold more than 1 Git Repositories, so it's easy to house multiple code repositories under a single Project, then multiple projects in a single collection.

Upvotes: 3

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31003

You can only migrate code from an existing TFVC repository to a new Git repository within the same organization/collection.

If you want to use TFVC import tool, you could consider spliting a single project collection into multiple project collections. For example, you could split a collection only contains BigProject, then migrate to Git in the same collection.

https://learn.microsoft.com/en-us/azure/devops/server/admin/split-team-project-collection?view=azure-devops

Upvotes: 1

Related Questions