我可以使用 Git 在具有历史记录的 svn 存储库之间移动文件吗?
我一直在使用 git-svn 来处理 svn 存储库 A,现在我需要将项目移至存储库 B。我可以使用 svn 从 A 导入最新的 HEAD。但我想保留历史记录如果有办法的话。有办法做到这一点吗?我可以将 repos b 添加为远程分支并提交给它吗?没有把握。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以为 git 使用一些特殊的 svn 插件,但最好使用 Subversion 自己的工具。
Subversion FAQ 有一个关于此的条目:如何合并两个完全独立的存储库?
简单的转储/加载方式曾经对我来说效果很好,但我当然建议在进行合并之前创建一个备份。
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.
在 git svn 文档中,有一个关于 dcommit 的注释 -- commit-url 选项(强调我的):
您可能已经发现了“不要询问”部分所指的含义。
In the git svn docs, there is a note for the
dcommit --commit-url
option (emphasis mine):It's possible that you've discovered what the "don't ask" part of this is referring to.