问题:
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
是一个的头,而其他有b
, c
, d
, e
和f
之上a
。 I want to move c
, d
, e
and f
to first branch without commit b
. 我想将c
, d
, e
和f
移到第一分支而不提交b
。 Using cherry pick it is easy: checkout first branch cherry-pick one by one c
to f
and rebase second branch onto first. 使用樱桃挑选很容易:以c
到f
逐个签出第一个分支樱桃选择,然后将第二个分支重新设置为第一个分支。 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
来源:oschina
链接:https://my.oschina.net/u/4438370/blog/3920436