Git includes a tool git-svn(1) for migrating your code repositories from Subversion (SVN) to Git. By far the easiest way to use this tool is on a SVN repository that uses the trunk/branches/tags SVN standard repository layout. Read the excellent guide at /git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git to migrate a SVN repository which follows the standard layout. The guide also has instructions on how to migrate code repositories from Mercurial to Git. In the case where you do not use the standard svn layout, git-svn still has options to specify which directories are your trunk (main line of development) and any additional branches, see the arguments to the git-svn init subcommand for details on how to specify these.