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.开发者_如何学C
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.
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://
orhttp://
for anonymous read) to be reused if a user is later given access to an alternate transport method (e.g.svn+ssh://
orhttps://
) 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.
精彩评论