SVN to GIT migration Using svn2git

SVN to GIT migration Using svn2git

We already had plans to migrate SVN to GIT for a while now in EM, but we just never found a chance to do it. Last week we had a major outrage in our Primus data center, which hosts all our development tools, including JIRA, SVN, Bamboo, and all the VM machines for development purposes. The outrage took quite a few days to recover, and as a result,  our head of engineering decided to migrate all our  SVN repository to GIT in BitBucket. The tool we used is called svn2git, it provides very easy command line tool for us to check out all the files under a repository, and then import all histories into GIT in no time, well, depends on the size of your repository of course. This tool provides several features that allow you to include either tags or branches, or simply only trunk, and also allow you to exclude some files based on regular expression patterns. It is quite a handy tool for this kind of migration. Sample commands includes:
svn2git --trunk dev --tags rel --nobranches
svn2git --trunk trunk --nobranches --notags
svn2git --rootistrunk
svn2git --exclude doc --exclude '.*~$'
svn2git --no-minimize-url
For further installation and usage instructions, please refer to their github home page.


Leave a Reply

Your email address will not be published. Required fields are marked *

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!