如何将连续的 SVN 和 BZR 存储库加入到 GIT 中?
我承认这是一个奇怪的请求...
我们有一个项目当前在 Bazaar 中管理,但之前存储在 Subversion 中。然而,之前的开发人员并没有复制历史记录,而是对 SVN 存储库进行了一次导出,并启动了一个全新的 BZR 存储库。
因此,我们有以下内容:
SVN: A-B-C-D
BZR: E-F-G-H
我想要的是:
GIT: A-B-C-D-E-D-G-H
谢谢
A strange request, I admit...
We have a project that is currently managed in Bazaar, but was previously stored in Subversion. However, rather that copying the history across, the previous developers took a single export of the SVN repo and started a brand-new BZR repo.
Thus, we have the following:
SVN: A-B-C-D
BZR: E-F-G-H
And what I want is:
GIT: A-B-C-D-E-D-G-H
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 git filter-branch 可能是最简单的。事实上,这是过滤器分支文档中的示例之一:
所以这里是您的提交 D,假设您正在从由 BZR 提交 E 到 H 组成的分支工作。因此,我假设您已使用迁移工具将 svn 和 bzr 历史记录导入 git,并将它们作为单独的分支导入到一个单一的存储库。
Probably easiest with
git filter-branch
. In fact, this is one of the examples in the filter-branch documentation:So here
<graft-id>
is your commit D, assuming you are working from a branch consisting of the BZR commits E to H. So I assume you've used migration tools to get both the svn and bzr histories into git, and imported them as separate branches into a single repository.