Moving to git from svn

We decided to move our source from svn to git. I wrote up some notes so it can be helpful for others.

Setup svn2git

First, install svn2git. See . I've copied the instructions for debian/ubuntu here:
$ sudo apt-get install git-core git-svn ruby rubygems
$ sudo gem install svn2git

Need to create a authors.txt file. svn2git uses that to couple svn users with username and email in git.
Here's a sample:
#svn_username = Real Name <>
If there are svn_usernames missing, svn2git will warn you about it.

Converting SVN to Git

Create a temporary directory and chdir to it:
$ mkdir /tmp/something
$ cd /tmp/something

Call svn2git at the root level of our svn repo.
$ svn2git --trunk trunk/fossology --branches branches --tags tags --authors authors.txt

Your temporary directory is now a full local git repository. Now we have to make the sourceforge git repository (“the remote”) and push our repository to it.
Create a repository on sourceforge and follow the instructions for importing an existing repository:
$ git remote add origin
$ git push origin master

And also push the tags:
$ git push --tags

Then, run git branch to see if there are branches that you want to push over to git as they’re NOT pushed by default:
$ git branch

$ git push origin fossology-2.4.0