[英]Maintaining Git Fork of Hg Repository with Patches
I am maintaining a git fork of an hg repository with some additional patches. 我正在维护带有一些其他补丁的hg存储库的git fork。 What this means is that I have cloned the hg repository and then pushed that repository to a git repository following these directions .
这意味着,我已经克隆了汞库,然后推该库以下面一个Git仓库这些方向 。
I then cloned the git repository, applied some commits and then pushed those commits to the git repository. 然后,我克隆了git存储库,应用了一些提交,然后将这些提交推送到git存储库。
My history look like: 我的历史记录如下:
hg-head\ /git-head
A-B-C-F'-G'
where F'
and G'
are my patches. F'
和G'
是我的补丁。
The hg developer now pushes some patches to the hg repos and I want to incorporate those changes into my fork. hg开发人员现在将一些补丁推送到hg仓库,我想将这些更改合并到我的fork中。 I would like to do so keeping the hg history intact.
我想这样做,以保持汞史完整。 In other words, I want my final history in git to look like:
换句话说,我希望我在git中的最终历史看起来像:
hg-head\ /git-head
A-B-C-E-F'-G'
where E
is the new commit on hg. 其中
E
是对hg的新提交。
in git terminology this would be saying "I want to rebase
my master branch onto origin/master". 在git的术语来说,这个会说“我要
rebase
我的主分支到原点/主”。
My question is what commands do I execute in hg and/or git to make this happen? 我的问题是我应该在hg和/或git中执行哪些命令来实现此目的?
hg rebase
hg rebase
Just note : You can simplify your workflow, if, instead of intermediate HG-node, you'll try to use Mercurial bridge in Git (part of Git now) for direct accessing upstream Mercurial repo from your Git 只需注意 :您可以简化工作流程,如果您尝试使用Git中的Mercurial桥 (现在是Git的一部分)代替中间的HG节点,以便从Git直接访问上游Mercurial存储库
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.