On Mon, Feb 5, 2018 at 3:46 AM, Sergey Organov <sorga...@gmail.com> wrote:
> Hello,
>
> $ git help cherry-pick
>
> -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.
>
> Isn't it always the case that "mainline" is the first parent, as that's
> how "git merge" happens to work?
>

First-parent will be whatever commit you were sitting on when you
typed "git merge".

If you're sitting on your branch and you type "git fetch; git merge
origin/master", then "mainline" will be 2nd parent.

Same happens if you type "git pull".

Further reading here:
https://developer.atlassian.com/blog/2016/04/stop-foxtrots-now/

"git revert -m" also has the same problem.


> Is, say, "-m 2" ever useful?
>
> --
> Sergey

Reply via email to