Convert from remote hosted SVN to GIT
I have SVN hosted and want to convert to Git and put it back into the hosted repository as Git.
I am on windows.
I have been using Tortoise Git since I've been using Tortoise SVN and love it.
And so I've set out to created a Git clone from the SVN. And then intend to take that clone and put it into the newly created hosted Git repository.
Is this the right way to do it? (N开发者_JAVA技巧ote: the reason I'm doing this is because I need a really simple way for remote code peer review and the only tool I've found only supports git.
git svn
can help you with the conversion.
# remember to read `man git-svn`, especially if you use a non-standard layout for the repository
git svn clone svn://url
git remote add origin _path_to_remote_git_repository_
git push origin master
Since you are converting to Git, you may not need the extra Subversion information in the repository. The easiest way to clean it up is by cloning the just-now-cloned
repository to get a fresh Git repository.
Take a look at svn2git, available on github. It's a utility written in Ruby that uses git-svn
to import the Subversion repository and then a bit of fixup on top of that.
精彩评论