[英]Is it possible to merge and link two unlinked repos on Github?
I have a repo on Github that was imported from Google Code (actually, someone else imported it and I forked it). 我在Github上有一个从谷歌代码导入的回购(实际上,其他人进口了它,我分叉了它)。 The original project has been dormant on Google Code since 2011. The code is mostly in a single file in the root directory.
自2011年以来,原始项目一直处于Google代码的休眠状态。代码主要位于根目录中的单个文件中。 My fork has the Google Code history.
我的前叉具有Google代码历史记录。 We've made additions to the code.
我们已经添加了代码。
A third person has also imported the original source to Github, and made changes. 第三个人还将原始来源导入Github,并进行了更改。 Someone forked that and added some more.
有人分叉了,并增加了一些。
(There are other similar Google Code->Github clones, so it might be useful to do something similar with some of those too.) (还有其他类似的Google Code-> Github克隆,因此与其中一些类似的东西也可能有用。)
I would like to somehow unify these, I'd like: 我想以某种方式统一这些,我想:
Ideally, I'd also like: 理想情况下,我也喜欢:
So: 所以:
Regarding the mercurial repo, you can start by converting it to Git ( fast-export/hg-fast-export.sh
). 关于mercurial repo,您可以
fast-export/hg-fast-export.sh
其转换为Git ( fast-export/hg-fast-export.sh
)。
And regarding the possibility to link two different histories (for two branches of unrelated repo), you can use git grafts (graft point) to make a common history. 关于链接两个不同历史的可能性(对于两个不相关的回购分支),您可以使用git移植(移植点)来创建共同的历史。
See for instance " How to rebase one Git repository onto another one? " ( .git/info/grafts
+ git filter-branch
). 请参阅“ 如何将一个Git存储库重新绑定到另一个存储库? ”(。
.git/info/grafts
+ git filter-branch
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.