0 votes
in Git by
How can I cherry-pick a merge commit?

1 Answer

0 votes
by

Candidates could find this entry among advanced Git interview questions commonly. Cherry-pick uses a diff for finding out the difference between branches. With the merge commit for a different branch, it has two changesets and two parents. For instance, if you have merge commit ref 64cv89d, you have to specify -m and use parent 1 as a base as follows –

git checkout release-branch  

git cherry-pick -m 1 64cv89d

...