General Question

Vincentt's avatar

Can I import my Git repository into Subversion?

Asked by Vincentt (8094points) March 3rd, 2008

I’ve been writing a project in Git, but there’s also an empty Subversion repository I’d like to sync it with. Is it possible to import the current revision into Subversion and track future commits? I think git-svn is supposed to be able to do that, but scanning that page I can only find options to create a new, empty Git repository instead of working with an existing one.

Thanks in advance.

Observing members: 0 Composing members: 0

15 Answers

andrew's avatar

I would think so… You might try using tailor to convert… Or, convert your repo to bazaar which can seamlessly commit to/from svn.

Vincentt's avatar

Thanks Andrew, Tailor looks very useful (at least, this post does). I do want to keep using the Git repo as the main one so converting is not really an option.
Thanks again!

Vincentt's avatar

Hmm… Documentation on Tailor is really lacking and the post I linked to doesn’t do what I want (i.e. commit my local repository to an external one), so any help with setting it up would be appreciated ;-)

mlaskt's avatar

I’m working on a similar problem, if I find a solution tomorrow I’ll post the details.

Vincentt's avatar

Awesome mlaskt, I’m eagerly awaiting :)

andrew's avatar

@vincentt: Are you totally sold on git? Do you have control over the repository? I just transitioned Fluther from SVN to bzr (after trying hg), and we’ve been thrilled. The SVN support for bzr is really top notch.

Vincentt's avatar

@andrew – well, I’m quite an easy switcher. I’ve tried Git and liked it better than Subversion, but if there are any specific advantages of Bazaar then I’m willing to switch. What exactly made you choose bzr? What I like best atm of Git is the speed, the ease of branching and merging, the decentralized aspect and the site gitorious.org that is an excellent home for open source projects using Git.
(If you can convince me of bzr, I hope there are some tools to convert from a Git repo to bzr ;-)

andrew's avatar

@vincentt: Here’s what I love about bzr (and I’ll be writing a blog post about it):

* You get all the benefits of DVCS.
* bzr, unlike most distributed systems, has great support for pseudo-centralized workflows—so you can get the benefit of distributed branches but it also makes lock-stepped development painless, and you also easily interact with subversion repos.
* bzr has the best documentation, IMO
* bzr has fantastic merge support.
* The IRC community is wonderful.
* It’s written in Python, and we’re a python shop.
* Fairly good 3rd party support (trac integration, eclipse integration)—much better than git, a little worse than hg
* Launchpad, the bzr project home, is phenominal.

bzr was written by the Ubuntu guys, and has great support from them.

Now, the speed is probably slower than git… so if you have a huge codebase, it might not be the best. But I branch the entire Fluther codebase in 3 seconds.

There are three tools to convert from git to bzr.

But you don’t have to take my word for it, see http://bazaar-vcs.org/BzrVsGit.

Vincentt's avatar

> bzr, unlike most distributed systems, has great support for pseudo-centralized workflows—so you can get the benefit of distributed branches but it also makes lock-stepped development painless, and you also easily interact with subversion repos.

Hmm, I don’t quite get this one. Could you elaborate a bit?

> bzr has the best documentation, IMO

Documentation is very important to me, but as Git’s documentation is excellent too it won’t pull me over. Same goes for the merges.

> The IRC community is wonderful.

Ubuntu, eh? :)
My problem with IRC is that I stop doing any other work, but of course, it’s still a benefit to be available :)

> Fairly good 3rd party support (trac integration, eclipse integration)—much better than git, a little worse than hg

This is very useful indeed. It won’t convert me immediately, but I’ll keep it in mind :)

> Launchpad, the bzr project home, is phenominal.

It is indeed, and I’ll very likely be using Launchpad once the project is all set up. When it comes to bzr integration, however, I like Gitorious’ features better.

> But you don’t have to take my word for it, see http://bazaar-vcs.org/BzrVsGit.

I’ve already read that before :)

All in all, Bazaar does indeed sound very appealing, and I’m definitely interested in that blog post. It’s good to know that it’s easy to convert (don’t you just love open source? :) so I’ll definitely be keeping it in mind. Thanks!

Vincentt's avatar

@mlaskt – any progress?

andrew's avatar

Sorry I dropped the ball on this…
bzr allows you to “bind” to a remote branch so that you can easily synchronize (or backup) to a central location while maintaining a distributed branch.

Vincentt's avatar

Ah, like Git’s pushing and pulling?

andrew's avatar

actually bzr’s pushing and pulling is analogous to git’s pushing and pulling. (;

Bound branches are similar to svn’s checkout… Very useful for teeeeny changes you need to push to a server or need to keep things synchronized with an svn repo.

Vincentt's avatar

Sorry, I still don’t quite get it xD
I’ve understood svn’s checkout to be similar to Git’s “clone”, except that it just pulls in one revision. Does it mean it automatically pushes and pulls changes?

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther