2

I am in Visual Studio 2015 "Team Explorer" on my master branch and I am trying to get some bugfixes I accidentally did on the development branch back into the master branch. Someone told me I should cherry-pick them.

So I made sure there are no uncommitted changes, and both branches are up-to-date with the server (push & pull & fetch). I went into "Branches", where master is marked bold (= the current branch) and right clicked on development -> Cherry-Pick. The error I get is

An error has occurred. Detailed message: Mainline branch is not specified but b0c4de0c8e164d09efe73a24aec3f9096c860e1f is a merge commit

I also tried to select Cherry-Pick on the remote branch (remotes/origin -> development), but this yields nearly the same error message:

An error has occurred. Detailed message: Mainline branch is not specified but d3e131d52e5af8aa0ff9bbd2e394da5232a66920 is a merge commit

What am I missing here?

Alexander
  • 19,906
  • 19
  • 75
  • 162
  • In cmd line if you do want to cherry-pick a merge commit, you must add the option `-m `, where n represents one of its parents. I don't know if your gui has such option. – ElpieKay Sep 01 '16 at 13:35

1 Answers1

4

You don't look like you are cherry-picking the commit, but trying to cherry-pick a merge, which will not know which of the two branch's to take the merge from.

Try to find the point in time you did the commit and get that commit hash.