开发者

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

开发者 https://www.devze.com 2022-12-11 02:04 出处:网络
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 topreserve the hi

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:// 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消