views:

1130

answers:

2

Reasons for doing this aside, is there a reasonable way to convert an entire git repository to subversion?

I can find only tons on information on migrating from subversion to git, and exchanging changesets between the two, but not for doing a simple conversion of the entire git repository to svn.

+5  A: 

The general problem with doing conversions this direction is that Git repositories can contain more than just a linear history of revisions, as Subversion would expect. Multiple ancestries with divergent histories and frequent merge commits are all possible, which can't be easily represented in a Subversion repository.

For simple cases where you do have a linear history in your Git repository, you can use git-svn dcommit to push the lot up to an otherwise empty Subversion repository.

Greg Hewgill
+1  A: 

I happen to have this need too. And I think that's a poor explanation.

Everything can be merged to a flat history. The fact that git traps you in its revision system is not because it's not possible, but because of the snobbery.

Now watch : http://kerneltrap.org/mailarchive/git/2008/10/26/3815034 And this: http://brandon.dimcheff.com/2009/01/04/commit-a-linear-git-history-to-subversion.html

None of them worked for me. Remember how easy was from svn to git?

(I finally did it following the instructions from google http://code.google.com/p/support/wiki/ImportingFromGit )

Vlagged
Everything can be merged to a flat history, but it won't necessarily make any sense. It isn't snobbery, it's that git handles more complicated situations than svn, and has to have a more complicated representation.
David Thornley
I just lost hair - these 2 hours, and hoped to find the answer on stackoverflow. Not only the solution I linked to doesn't work, but there's another hack: http://brandon.dimcheff.com/2009/01/04/commit-a-linear-git-history-to-subversion.html I don't seem to get working . So there, I *know* I have a linear history (that's why I want to go back to sVN after all). And you tell me that it's just because "git handles more complicated situations that svn"?. Sorry, but I am right telling that I'm locked into git. (no, I don't want my money back, but I can still vote with my "wallet").
Vlagged