美文网首页git
git rebase --onto用法(2)

git rebase --onto用法(2)

作者: 谢昆明 | 来源:发表于2017-08-13 11:36 被阅读221次

    git base --onto branch C1 C2是一个左开右闭的操作
    也就是上述指令只合并C2,不合并C1

    例子:合并C3-C4到master

    C0-C1 -master
        ` C2 - C3 - C4 - C5 - feature
    

    1. 创建C4的branch_c4

    git branch branch_c4

    2. 创建C3-C4的patch

    git rebase --onto master C3~1 branch_c4

    3. 合并到master

    git check master
    git merge branch_c4

    4. 合并成功,删除branch_c4

    git branch -D branch_c4

    打赏

    如果这篇文章解决了您的问题,让我买根烟抽抽。

    支付宝.jpg 微信.jpg

    相关文章

      网友评论

        本文标题:git rebase --onto用法(2)

        本文链接:https://www.haomeiwen.com/subject/cggsrxtx.html