Wednesday, November 22, 2017

How to migrate a Git repo from VSTS to VSTS

The process to migrate a Git repository from a Visual Studio Team Services project to another within the same account or to a different account is very easy:

First of all we must generate a personal access token (PAS) for our user in source account, in this way the target account will be able to access to the source account safely to perform the migration process. In order to this we must go to the security section of our VSTS profile and add a new token:


We give a name to the token and create it with the default parameters.


Once created, we must make sure copy the personal access token to use it in the migration process, because we won't be able to see it again.


To start the repository migration we must initiate an import process from the destination account in which we will indicate the name of the new repository, the url of the source repository and the personal access token:


Once the process is finished we can go to our new repository and check that both the code and the history of changes has been successfully migrated.




No comments:

Post a Comment