Import TFSVC repository to Git

If you are still using the TFSVC repository (on Azure DevOps or TFS on-premise server), now is time to move forward and migrate to Git. In this story you’ll find out an easy way to do this migration in minutes.

Open the project section from Azure or TFS and navigate to your project.

  1. Navigate to code Tab, and under project name click the drop down menu:

Image for post

 

Code tab

2. Press Import respository option and after that the below window will appear

Image for post

 

Import repository

3. On source type select TFSVC, on path use the path where the project is located in TFS, check the Migrate History and select o period of time for that and give a name to new GIT source code. After that press the Import button

Image for post

 

Import from TFSVC to Git

Sit back and relax until the selected branch is migrated to GIT

Image for post

 

Migrate a repository

Additional steps

After the migration process navigate to the code section in Azure DevOps or TFS and click on master branch. If you want to create a new branch, use new branch option and create a new branch (DEV in this example) based on master branch and click Create branch button

Image for post

 

Create branch

Navigate to settings, Version control, expand the options from the new branch (DEv in this example) and click Set as default branch

Image for post

 

Set a default branch

If you want to remove the master branch, you can navigate to code section, branches and press the delete branch option

Image for post

 

Delete branch

This is how you can migrate your repository from TFSVC to Git to explore and use the Git features. You can find out how to use Git features in Visual studio 2019.