Git: Is there a way to figure out where a commit was cherry-pick'ed from?

Posted by EricSchaefer on Stack Overflow See other posts from Stack Overflow or by EricSchaefer
Published on 2010-05-27T15:51:31Z Indexed on 2010/05/27 21:51 UTC
Read the original article Hit count: 226

Filed under:
|

If I cherry-pick from multiple branches, is there a simple way to figure out where the commit was coming from (e.g. the sha of the original commit)?

Example:
- at master branch
- cherry pick commit A from a dev branch
- A becomes D at the master branch

Before:

* B (master) Feature Y
| * C (dev) Feature Z
| * A Feature X
|/
* 3
* 2
* 1  

After:

* D (master) Feature X
* B Feature Y
| * C (dev) Feature Z
| * A Feature X
|/
* 3
* 2
* 1  

Is it possible to figure out that B was cherry-picked from A (aside from searching for the commit message)?

© Stack Overflow or respective owner

Related posts about git

Related posts about scm