There are two ways to convert a Subversion repository to Git. It really depends on whether your current Subversion repository follows the standard layout with trunk, tags, branches folders at the root of your repository.
If your Subversion repository does follow that scheme, and you would like to preserve your tags and branches, then you will need to do some additional work.
git-svn
is part of most Git distributions. Once it's installed,
converting your repository is as simple as running:
$ git svn clone http://svn/repo/here/trunk
This will produce a new Git repository which can be used like any Git repository. However, this simple approach will preserve your current Subversion author usernames, and does not preserve your tags and branches.
This assumes that your current Subversion repository uses the standard layout with trunk, tags and branches at the top level of your repository.
Create a new file called ~/authors.txt
(or any other name) that maps
your Subversion users to your Git name/email combination:
user1 = First Last Name <email@address.com>
user2 = First Last Name <email@address.com>
…
You can then clone the Subversion repository using git-svn
:
git svn clone --stdlayout --no-metadata -A ~/authors.txt http://svn/repo/here
We (xp-dev.com) can do this for you as we have done many conversions in the past. Please do contact us for a quote.
Feel free to contact us if you need any assistance.
XP-Dev.com is a service provided by Exentrique Solutions Ltd
Registered UK Company No. 7051179
VAT: GB979715454
All prices are excluding UK VAT unless indicated otherwise
Email: admin@xp-dev.com
Twitter: @xpdev
Mail: 15 Avante Court, The Bittons, Kingston Upon Thames, KT1 2AN
If your account is on our old platform, i.e. your project and repository URLs begin with https://xp-dev.com, then you can login here
Otherwise, you will need to login to your custom account login page, which would normally be https://<your account>.xp-dev.com
You can get a reminder of all your accounts using our Account Reminder tool