mkdir svn-repo
svn checkout svn://example.org svn-repo/
Will create a list of all the contributers of the SVN repo.
cd svn-repo/
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > ~/svn-authors.txt
However SVN will list the username as both the real name and the email address, so open up ~/svn-authors.txt
and edit the file so the lines goes from looking like:
some_user = some_user <some_user>
to this
some_user = Some User <[email protected]>
# Make temporary clone
mkdir git-repo-tmp && cd git-repo-tmp/
git svn init svn://example.org --no-metadata
# Make it use the authors.txt we created
git config svn.authorsfile ~/svn-authors.txt
# Fetch all the data
git svn fetch
# Now make a normal git clone of your git-svn checkout
cd ..
git clone git-repo-tmp git-repo
# Remove the temporary clone
rm -rf git-repo-tmp
# Remove the deleted repo from remotes
cd git-repo
git remote rm origin
http://stackoverflow.com/questions/79165/how-to-migrate-svn-with-history-to-a-new-git-repository http://john.albin.net/git/convert-subversion-to-git
To update the new git remote from the old svn remote: