Cherry-Picking few commits from another branch

后端 未结 2 1948
走了就别回头了
走了就别回头了 2021-02-03 19:40

I have a scenario where I don\'t want to cherry-pick a specific commit but a range of git commits from remote. I can do force pull with hard option but that will get all the com

相关标签:
2条回答
  • 2021-02-03 20:21

    Let's say the history is A-B-C-D-E-F-G, and you'd like to cherry-pick C-D-E-F.

    git cherry-pick B..F
    

    or

    git cherry-pick C^..F
    

    or

    git cherry-pick C D E F
    
    0 讨论(0)
  • 2021-02-03 20:40

    Use
    git cherry-pick 76cada 56qwqw 46erer

    0 讨论(0)
提交回复
热议问题