Skip to content

Instantly share code, notes, and snippets.

@gelias
Last active March 15, 2018 19:05
Show Gist options
  • Save gelias/5025e2dc73f37c856c59a57826ae7915 to your computer and use it in GitHub Desktop.
Save gelias/5025e2dc73f37c856c59a57826ae7915 to your computer and use it in GitHub Desktop.
Migrate SVN projects to Git
#Using Case-sentive or Non Case-sensitive filesystem
# Bitbucket tutorial https://www.atlassian.com/git/tutorials/migrating-prepare
java -jar ~/svn-migration-scripts.jar authors http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> <svn_user> <svn_password> > /tmp/authors.txt
git svn clone --trunk=./ --authors-file=/tmp/authors.txt http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> /tmp/<git_repo_name>
#Using Docker - https://hub.docker.com/r/yukinagae/svn-to-git
docker pull yukinagae/svn-to-git
docker run -it -p 80:80 yukinagae/svn-to-git /bin/bash
java -jar /usr/local/src/svn-migration-scripts.jar authors http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> <svn_user> <svn_passwd> > /usr/local/src/authors.txt
git svn clone --trunk=./ --authors-file=/usr/local/src/authors.txt http://SVN_URL:SVN_PORT/svn/<PATH>/trunk/<repo-name> <svn_user> <svn_passwd> /usr/local/src/<git_repo_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment