我已经从上游主服务器叉了my_fork
。后来,另一位开发人员将上游分支到了自己的分支his_fork
上,并用它创建了bug_fix_branch
。我想将该错误修复内容提取到my_fork
中。
upstream master ===========================>
\ \
\ \==============> his_fork
\ \=========> bug_fix_branch
\ |
\ | How to do this?
\ V
\=================> my_fork
该怎么做?
答案 0 :(得分:0)
我会这样:
git checkout my_fork
# counting revisions in bug_fix_branch... say it's 3 revisions:
git cherry-pick bug_fix_branch~3..bug_fix_branch
# or not counting revisions in bug_fix_branch
git cherry-pick ^his_fork bug_fix_branch