I'm trying to cherry-pick a commit from CyanogenMod Github and having issue, here's more info:
Commit to cherry-pick: https://github.com/CyanogenMod/android_device_lge_bullhead/commit/4c98c8df392dfb305d7ffe5deaf9a2bdf7824037
Error occurring:
error: commit 4c98c8df392dfb305d7ffe5deaf9a2bdf7824037 is a merge but no -m option was given. fatal: cherry-pick failed
Please help me, my repo is based off CM, has a different branch and is modified for a different ROM.
When cherry-picking a merge commit, you need to specify the mainline. The documentation:
Consider the following commit log:
Now, if you tell git to cherry-pick G, you are telling it: "Take the changes that commit G introduces". But that is ambiguous - in relation to commit C, G introduces changes made in D, E, and F. In relation to commit F, it introduces changes B and C.
To overcome this, you need to specify the mainline argument, which tells git whether C or F should be considered the mainline against which the comparison is done.