如何将上游的另一个分支分支引入分支分支?

时间:2019-06-26 03:43:25

标签: git

我已经从上游主服务器叉了my_fork。后来,另一位开发人员将上游分支到了自己的分支his_fork上,并用它创建了bug_fix_branch。我想将该错误修复内容提取到my_fork中。


upstream master ===========================>
                   \       \
                    \       \==============> his_fork
                     \           \=========> bug_fix_branch
                      \              |
                       \             | How to do this?
                        \            V 
                         \=================> my_fork

该怎么做?

1 个答案:

答案 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
相关问题