Thursday 5 January 2012

Move non-standard subversion repository into github

I had some issues when trying to migrate my svn repo into git. I think the main problem was that the docs assume that you have a standard svn layout (which I didn't).

First, create your github repo, but do not follow any of the commands that it suggests.

Then run these commands instead:

mkdir <name>
cd <name>
git svn clone -T http://<host>/<repo>/<path>/<to>/<name> .
git remote add origin git@github.com:<github_username>/<name>.git
git push -u origin master

Tar-dah, all done!

No comments:

Post a Comment