tags:

views:

78

answers:

3

Hi,

I'm currently trying to convince my company to migrate to git from subversion, and one thing that would be really helpful would be to allow me to store a repository in subversion and git at the same time (then I can show them how easy it is to do in git what they've spent an hour trying to do in subversion). I guess that I could put my subversion repository straight into git, but this seems to leave loads of .svn artifacts in each directory. Does anyone know if there's a way to avoid this?

+1  A: 

You can import a svn repository into a git repository and play with it, and sync at any time with the subversion changes. However AFAIK you can't send the git repository changes back to the subversion one.

Github just started offering read/write access to the git repositories. So it theory you could import a svn repository into a git repository in github, and continue using it with the svn tools too. They also offer a version to be used inside your firewall.

duncan
"AFAIK you can't send the git repository changes back to the subversion one."Not at all true -- as David M says above, git svn is a two-way street.
ebneter
I remember having problems when making a git-svn clone of a svn repository in two machines, then I could not longer pull/push patches using git between those two machines and use both to send changes back to subversion.
duncan
+5  A: 

Using git-svn might be your best choice at the moment - it's a bidirectional interface between git and Subversion. You create a git repository that is essentially a Subversion working copy. There are caveats though - you shouldn't clone that repository or do push/pulls from it. See the relevant manpage.

I would recommend having a pilot project that you switch from Subversion to git, instead of trying to do both Subversion and git at the same time on the same code. I worry about using git-svn as a stepping stone, because any problems with getting them to interoperate will likely be used to scuttle the whole git idea.

There's plenty of commentary about how/why to move from Subversion to some DVCS. Here's one I like:

http://joelonsoftware.com/items/2010/03/17.html

David M
+1  A: 

I hate to recommend it, but it may be an option that works for you. GitHub just announced subversion client support on Git Repositories.

Keep in mind, with new technology comes new bugs.

AlReece45