-1

TL;DR

I need to find the parent ID so I can cherry pick the pull request to another branch (not master).


Long version

Several developers (example: coder1 and coder2) have forked dev branch and changed some files. They were finished and have created pull requests to be merge into our dev branch. I have approved all of them.

I want to cherry pick the changes included in the pull request created by coder1 only so I tried this:

 git cherry-pick my-hash-id-here
 error: commit my-hash-id-here is a merge but no -m option was given.
 fatal: cherry-pick failed

my-hash-id is the hash ID for the pull requests (at least looking at repo)

Any ideas on how to find the parent ID to use?

Thank you.

mrjayviper
  • 2,258
  • 11
  • 46
  • 82

1 Answers1

2

First, use git show on the commit you want to cherry-pick, and find a line such as this:

Merge: abc123 def456

The order in which the commits appear determines the number. Here, abc123 would be parent ID 1 and def456 would be parent ID 2.

1615903
  • 32,635
  • 12
  • 70
  • 99