如何挑选多个提交

允我心安 提交于 2020-04-25 02:07:09

问题:

I have two branches. 我有两个分支。 Commit a is the head of one, while the other has b , c , d , e and f on top of a . 提交a是一个的头,而其他有bcdef之上a I want to move c , d , e and f to first branch without commit b . 我想将cdef移到第一分支而不提交b Using cherry pick it is easy: checkout first branch cherry-pick one by one c to f and rebase second branch onto first. 使用樱桃挑选很容易:以cf逐个签出第一个分支樱桃选择,然后将第二个分支重新设置为第一个分支。 But is there any way to cherry-pick all c - f in one command? 但是,有什么方法可以在一个命令中挑选所有c - f吗?

Here is a visual description of the scenario (thanks JJD ): 这是该场景的直观描述(感谢JJD ):

在此处输入图片说明


解决方案:

参考一: https://stackoom.com/question/70h8/如何挑选多个提交
参考二: https://oldbug.net/q/70h8/How-to-cherry-pick-multiple-commits
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!