Migrate only part of TFS repository with history to Git azure devops

784 Views Asked by At

We have folder structure in tfs repository MISC like this:-

Test1(sub-Folder1)->
        Test1Solution.txt
Test2(sub-Folder2)
        Test3(sub-Folder2.1)
                Test3Solution.txt
                Test4 (sub-Folder2.1.1)

And we want to migrate Test1 and Test3 folders to a single git repository in azure devops with history.

i tried to do it using git-tf but failed to do

Could someone help me please

1

There are 1 best solutions below

1
On

Git-TF has reached its end-of-life. You should try with Git-TFS tool instead of git-tf. Since you want to migrate from TFVC in on-premise TFS, to Git in Azure DevOps, you need to refer to the link below:

https://learn.microsoft.com/en-us/azure/devops/learn/git/migrate-other-systems-to-git

For the mainline or first branch you wish to migrate

  1. Create a repository in Azure DevOps and clone it locally.
  2. Check out the latest version of your branch from TFVC onto your local disk.
  3. Remove binaries and build tools from your repository and set up a package management system like NuGet.
  4. Convert version control system-specific directives that you need to retain in Git. For example, convert .tfignore files to .gitignore, and convert .tpattributes files to .gitattributes.
  5. Delete files or data that binds your code to the legacy version control system. For example, delete the $tf directory that contains TFVC metadata.
  6. Optionally, create and commit a “breadcrumbs” file that provides information about how to access your legacy version control system.
  7. Add and commit your files to the Git repository and push the repository to Azure DevOps.

After migrating the repos, delete the files you don't need.