To migrate a TFS repository to a Azure DevOps Git repository, just perform the following steps:
- Install the Git command line tools so that the tools are registered in the Windows command prompt
- Install the Windows package manager Chocolatey
-
Install the command line tool git-tfs with Chocolatey:
choco install gittfs
-
Create a local directory for the new Git repository and set the command line’s currect directory to this directory
-
Clone the TFS repository into the local directory:
git tfs clone https://[TFSSERVER] $/[REPOSITORYPATH] . –ignore-branches –debug
-
Optionally add
.gitignore
and.gitattributes
files to your Git repository -
Add the VSO Git server as origin:
git remote add origin https://[PROJECTNAME].visualstudio.com/DefaultCollection/[COLLECTIONNAME]/_git/[REPOSITORYNAME]
-
Push all changes to the remote server:
git push -u origin master
Rico Suter
SOFTWARE ENGINEERING
EDIT
Git Migration Source Control TFS Azure DevOps