I was asked to migrate an on-premise Subversion repository to cloud-hosted Git for quite a large project. There was a lot to find out so I did many attempts and experiments until I finally managed to migrate the complete repository including all history, branches and tags. As this process took me weeks or even months to complete, I will not go into too much detail, but the steps necessary to complete the job are listed below for your, and my own, future reference.
Important to mention:
- The entire process was hard enough already, so I decided to not support two-way synchronization, which means I communicated a specific date to the development-teams involved on which we made the final “switch”. From that moment on, all commits needed to go to Git and Svn was set to read-only.
- Because the usernames in Svn and VSTS are not the same, an authors.txt file was needed in which I defined the Svn-usernames and their respective VSTS counterpart. By using such a file, the git-svn process will re-write the commits as-if they were done by the VSTS-user. You could omit this part, but in that case the history of your commits will not be mapped to actual VSTS-users. The commit-author will just be handled as a string.
Example of authors file:
The contents of my authors.txt file are illustrated below. Of course these names are fictional.
johndoe = John Doe <firstname.lastname@example.org>
robinpaardekam = Robin Paardekam <email@example.com>