简体   繁体   中英

Migrating VSTS\TFVC code to Git DevOps on different domain

About 4-5 years ago, we made a free VSTS\\TFVC account at visualstudio.com if i remember correctly.

We used our private email like hotmail to make the account. It was free for 5 users.

Recently microsfot did some renaming\\rebradning, and called it now DevOps, not sure how all the terms work.

The problem is, now our company has its own DevOps which is somehow connected to the orginazitions sharepont\\teams\\etc.

We would now like to migrate our VSTS\\TFVC code from the old account to our DevOps account which is connected to our orignization. We would like to transfer the VSTS\\TFVC code to Git.

Is this possible?, we would ofcourse like to keep all the commits, comments, history, etc..

Of course it can.

First you need to create the PAT token of the old org, and go your company org, open the project you want to clone to. Open repos Files , choose Import Repository .

在此输入图像描述

Input the code URL of your old org into the Clone URL , and enable the checkbox- Requires authorization . You must authorized it and input the PAT token you create just now into the Password/PAT blank, or you will get the error that Clone URL requires authorization .

在此输入图像描述

Click Import and wait for some seconds until it succeed. It can clone the message with branches, commits, tags and etc.

Edit:

Since the old repos type is TFVC, so just choose source type as TFVC . Enable migrate history and choose the time scope of history because you want retain the record.

But, as you said in the comment, the longest time you can choose is 180 days. This is as designed by Microsoft. You can check this in the document .

And also, the other UI limit is the imported repository and associated history (if imported) cannot exceed 1GB in size.

Edit 2nd :

Until now, we could not get and migrate all of the history of TFVC repos from UI page. But you can use another tool to achieve what you want : git-tfs .

(1) Use git-tfs to create a locally git repos from your complete history of TFVC repos . (2) Push this locally git repos to your remote project.

I check out this doc which can for you refer to achieve what you want: Advanced migrations .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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