$ git cherry-pick xxx
error: commit xxx is a merge but no -m option was given.
fatal: cherry-pick failed
然后修改命令:git cherry-pick -m 1 xxx 可以成功
-m 配置项告诉 Git,应该采用哪个分支的变动。它的参数parent-number是一个从1开始的整数,代表原始提交的父分支编号
parent-number
1
一般来说,1号父分支是接受变动的分支(the branch being merged into),2号父分支是作为变动来源的分支
个人理解:在这里 1 是指 master 分支,2 是指 issue-101 分支
Sign in to make a reply
用户7347490165
$ git cherry-pick xxx
error: commit xxx is a merge but no -m option was given.
fatal: cherry-pick failed
然后修改命令:git cherry-pick -m 1 xxx 可以成功
-m 配置项告诉 Git,应该采用哪个分支的变动。它的参数
parent-number
是一个从1
开始的整数,代表原始提交的父分支编号一般来说,1号父分支是接受变动的分支(the branch being merged into),2号父分支是作为变动来源的分支
个人理解:在这里 1 是指 master 分支,2 是指 issue-101 分支