commit xxx is a merge but no -m option was given問題解決

-m parent-number
--mainline parent-number
Usually you cannot cherry-pick a merge because you do not know which side of the merge should be considered the mainline. 
This option specifies the parent number (starting from 1) of the mainline and allows cherry-pick to replay the change relative to the specified parent.

一般來說你不能cherry-pick一個合併提交,因爲此時無法知道合併的分支中哪一個作爲主線。此參數指定主線分支號,以便允許cherry-pick來基於指定的主線分支來重新應用代碼更改。

 

所以 git cherry-pick -m 1 xxxxxxx 即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章