Moving my SVN local file repo to GitHub
I have a local file SVN repo of a project that needs to move to GitHub. I know from what I've read on the GitHub site and a related question here on stack-overflow that it's a simple matter to move the repo from an SVN server into the GitHub repo.
But my problem is that I have a local file repository. What is the recommended way of moving this type of repository to GitHub?
Update:
As far as I can tell there is no direct way of moving the local file repository over to git. The easiest solution would be to move the repository over to an open SVN host like Google, then use the GitHub service application to clone from SVN. However, I don't have that option because I'm not allowed to make the code public (it's not my code).
So what I'm going to try to do is to:
- Set up a proper SVN server on a local machine.
- Create a new repository on that machine.
- Dump my file:// repository and port that to repository on the server.
- Clone from from the new SVN repository to a local machine.
- Finally push that back to GitHub.
The caveat is that I'm be开发者_如何学运维hind a firewall.
what I ended up doing to make this work :
Set up a proper SVN server on a local machine
- Download and installed an svn server.
I mostly follwed instructions I found at http://wiki.centos.org/HowTos/Subversion
- Download and installed an svn server.
Create a new repository on that machine.
svnadmin create repos
Dump my file:// repository and port that to repository on the server.
- First I needed to create a dump of my repository. So I installed silksvn on my machine ( http://www.sliksvn.com/en/download )
Then I just ran the following command from the terminal window:
svnadmin dump PATH_TO_MY_REPOSTITORY > myrepository.dump
asdfdasfMoved the "myrepository.dump" over to the machine with SVN serv
Imported the files into the repository:
svnadmin load PATH_TO_MY_REPOSTITORY_ON_SERVER < myrepository.dump
Clone from from the new SVN repository to a local machine.
Installed git on the server machine where
Followed the instructions on the github help
Finally push that back to GitHub.
- Followed the instructions on the github help
There are plenty of docs on github.com that explain what your options are.
At worst, you publish your local repository somewhere publicly visible and let github slurp it up.
精彩评论