Mike Akers
Mike Akers

Reputation: 12247

Can I use Git to move files between svn repos with the history?

I've been using git-svn to work with svn repository A, and now I need to move the project over to repository B. I could just use svn to import the lastest HEAD from A. But I'd like to preserve the history if there's a way. Is there a way to do this? Can I add repos b as a remote branch and dcommit to it or something? Not sure.

Upvotes: 2

Views: 193

Answers (2)

johannes
johannes

Reputation: 15989

You could using some special svn plugins for git but it's better to use Subversion's own tools for that.

The Subversion FAQ has an entry about this: How do I merge two completely separate repositories?

The simple dump/load way worked for me once quite well but I'd certainly suggest to create a backup before doing this merge.

Upvotes: 2

Greg Hewgill
Greg Hewgill

Reputation: 994361

In the git svn docs, there is a note for the dcommit --commit-url option (emphasis mine):

This is intended to allow existing git svn repositories created with one transport method (e.g. svn:// or http:// for anonymous read) to be reused if a user is later given access to an alternate transport method (e.g. svn+ssh:// or https://) for commit. Using this option for any other purpose (don't ask) is very strongly discouraged.

It's possible that you've discovered what the "don't ask" part of this is referring to.

Upvotes: 0

Related Questions