views:

163

answers:

2

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? (Note: 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.

+1  A: 

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.

Alan Haggai Alavi
May I also suggest you delete extraneous tags and branches? Depending on the customs and adherence thereto within your team, git-svn can produce a lot of odd tags that aren't particularly helpful.
jhs
A: 

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.

Greg Bacon
I am on windows so can't do sudo...I have installed a ruby on rails and can git gems...will this still work?
Angela
I would expect it to run on Windows, but I haven't tested it on that platform. Try it and let us know!
Greg Bacon