Cherry-Picking few commits from another branch

后端 未结 2 1928
走了就别回头了
走了就别回头了 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
    

提交回复
热议问题