Rico Suter's blog.
 


To migrate a TFS repository to a Azure DevOps Git repository, just perform the following steps:

  1. Install the Git command line tools so that the tools are registered in the Windows command prompt
  2. Install the Windows package manager Chocolatey
  3. Install the command line tool git-tfs with Chocolatey:

    choco install gittfs

  4. Create a local directory for the new Git repository and set the command line’s currect directory to this directory

  5. Clone the TFS repository into the local directory:

    git tfs clone https://[TFSSERVER] $/[REPOSITORYPATH] . –ignore-branches –debug

  6. Optionally add .gitignore and .gitattributes files to your Git repository

  7. Add the VSO Git server as origin:

    git remote add origin https://[PROJECTNAME].visualstudio.com/DefaultCollection/[COLLECTIONNAME]/_git/[REPOSITORYNAME]

  8. Push all changes to the remote server:

    git push -u origin master



Discussion