We highly recommend using the svn2git tool to convert an SVN repository to a git repository. Svn2git is designed to provide a complete svn import. At its core it uses git-svn to do the majority of the work, then cleans up the mess of "tag branches" that svn leaves behind, converting them into proper git tags.

For more detail on how to do the conversion using svn2git, check out the svn2git README.

Pushing the repository to GitHub

Once your conversion is done and you are satisfied with the local repository you have, you can push it to GitHub to share the love.

  1. Create a new repository
  2. Push the repository
git remote add origin git@github.com:GITHUB_USERNAME/REPO_NAME.git
git push origin master

Best practices for importing

We suggest importing each part of your SVN repository that you'd:

  • want developers to be able to work with (check out/commit/etc.) separately from the others
  • want to limit access differently than the others

to its own separate GitHub repository.

In a typical Subversion environment, multiple projects are stored in a single root SVN repository. On GitHub, these same projects will usually map to multiple GitHub repositories for the user or organization.