I have a full checkout of svn repository in a folder. But I don't have the credentials of the svn repository(hosted in Unfuddle). I want to move this folder to a new git repostitory ( Github) with all its history and changes intact . If possible I would like to keep the commiters . How do I export my exiting svn folder to Github ?
An SVN checkout does not include it's own history, so all you can do is treat it as a normal set of files.
git init newgit
svn export yourcheckout newgit
git commit -a newgit
svn export will copy all the files except the hidden .svn directories. git commit -a will recursively add everything to change control and commit it. You'll be prompted for a commit note, of course.
To publish it to github, first create an account at github, then go here to create a repository:
http://help.github.com/create-a-repo/
Let's say you called it test and your account is prabesh, so it's full name is
[email protected]:prabesh/test.git
The full details of what to do are shown on github when you create a repo, but once your repo exists, you can upload your local svn exported git repo to github, by registering the remote (github) repo, and pushing your local copy to it:
git remote add origin [email protected]:prabesh/test.git
git push -u origin master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With