views:

640

answers:

4

I want to access a repository using both GIT and SVN clients. A way I imagined to do that is through automatic two-way migration: when a user PUSHes into the GIT repository, it is also COMMITed in the SVN repository and vice-versa.

There is any tool that would help me to do that?

+9  A: 

The best way to do this is to use git svn as a Subversion client. This provides two-way integration between a Subversion repository and a Git repository. Once you have a Git repository, you can push that anywhere else to publish it.

I do this regularly, at work there is a Subversion repository that is the "master" repository, and I usually use git svn to access it. Sometimes if I'm doing things that need more specific Subversion functionality like merging, I'll use the regular svn client against the repository instead.

Greg Hewgill
A: 

Surely an easier way to do it would be to have the main repository stay as Subversion, but use git-svn locally?

Daniel Roseman
+2  A: 

You might consider svn2git to easily import svn to git, and then its mirror ruby application git2svn.
More details in this question.
As mentioned in the other answers, 'git svn' is mandatory, but those ruby modules help you respect the "subversion branches/directory" while not having them as an actual directory in Git.

VonC
A: 

You might also want to check out this solution: http://unethicalblogger.com/posts/2008/10/git_back_subversion_mostly_automagically_part_33 , which was used to synchronize a repo between git and subversion, with multiple developers using both git and subversion, and a proxy between them to do the synchronization.

Brandon