blog

9 Simple Steps for Migrating from TFVC to Azure DevOps

Download a guide to implementing the best Customer Experience Strategy

Free Download

Download our latest white paper on how to deliver an excellent customer experience (CX) with ease and quickly.

DOWNLOAD NOW

Get your FREE whitepaper

Introduction

One of clients recently requested to migrate the projects source control from TFVC (Team Foundation Version Control) to Azure DevOps. Initially, I thought it would be a lift and shift activity, but apparently, that was not the case. Had to face various issues like access related and wrong tools which led me to an incorrect path. Finally found a clean method/procedure to accomplish the given activity.

Prerequisites

If not available, Git can be downloaded from the following: https://github.com/git-for-windows/git/releases/download/v2.29.1.windows.1/Git-2.29.1-64-bit.exe

Procedure

Following steps taken for the migration:

1. Get the latest code from Team Foundation Version Control (TFVC) using any appropriate tool (in my case I have used “Git Extensions”) and update the local file system (c:\source\) which will act as the Source.

2. Open Azure DevOps and create a new repository which will act as the Destination

Step 2 - Migration from Team Foundation Server to Azure DataOps

You may add appropriate .ignore file, sample below shows ignore files for VisualStudio)

3. Clone the Azure DevOps repository to the local file system by clicking the Clone button

Step 3 - Migration from Team Foundation Server to Azure DataOps

Click on the “Copy clone URL to clipboard” icon to copy the URL

Step 4 - Migration from Team Foundation Server to Azure DataOps

Now use the above-copied URL to clone the repository in the local file system,

  • for example C:\Repository\
  • Open the command prompt and navigate to the same location and run the following command:
  • >git clone “URL of repository”

Example screenshot:

Step 5 - Migration from Team Foundation Server to Azure DataOps

4. Copy the contents from Source (“c:\source” ref in step#1) and paste it inside “c:\Repository\MyRepositoryName\”

5. Open the command prompt and enter the following command to add the files and folder

>git add *.*

Step 6 - Migration from Team Foundation Server to Azure DataOps

Note: Make sure to run the git add command from the appropriate repository folder name, an example shown above.

6. Commit the file changes by running the following command

>git commit -a -m “comments”

Step 7 - Migration from Team Foundation Server to Azure DataOps

 

 

7. Check the status of the commit by running the following command

>git status

Step 8 - Migration from Team Foundation Server to Azure DataOps

8. Push the source code to the remote server by running the following command

>git push

9. Source code will now appear in the Azure DevOps (destination) ref: step # 2 https://dev.azure.com/DepartmentName/RepositoryName/_git/RepositoryName

Overall Workflow

Step 9 - Migration from Team Foundation Server to Azure DataOps


ACS can help you in various aspects of software development in all phases of DevOps. Just complete the form for a free consultation and we shall be in touch with you to understand your specific requirements.

Suggested reading

Subscribe to receive the latest insights to your inbox

Please see our Privacy policy for more information.