Mike
Mike

Reputation: 621

Gitlab: Sorry, we cannot cherry-pick this merge request automatically

I got following error in the Gitlab:

Sorry, we cannot cherry-pick this merge request automatically. This merge request may already have been cherry picked, or a more recent commit may have updated some of its content.

I have branch X from which I have to cherry pick commits to the branch Y. Maybe I have already done cherry pick, which is after this failed cherry pick. I have about 10 cherry picks to do.

What I should to do?

I was thinking if I create new branch Z (before Y) and try add cherry picks in the right order. Maybe that would be solution? What you think?

Upvotes: 21

Views: 45484

Answers (1)

Mike
Mike

Reputation: 621

I did the cherry picks so that I picked up the merge request commits with commands like this:

git cherry-pick -m 1 <merge request commit hash 1>
git cherry-pick -m 1 <merge request commit hash 2>
...
git cherry-pick -m 1 <merge request commit hash N>

The -m 1 parameter is a little bit cryptical in the documentation, but I have done a lot of cherry picks and this is working.

Upvotes: 24

Related Questions