1

Assume that there are two branch develop and master.

They are like this (alphabets are commits), master was created based on develop at B:

A — B — C — D (develop)

A — B — E — F — (C cherry-picked) — G — H (master)

How can I confirm C cherry-picked is picked from C from the upper part?

Fortunately I can recognize commits by commit messages so far. However, I wonder if it is possible to confirm like above.

I know that commit is not difference but like a snapshot. and cherry-pick is calculated between commits.

In this case, I could compare the results of these below:

git diff F (C cherry-picked)
git diff B C

or

git show C
git show (C cherry—picked)

I hope there is a better way..

kensuke1984
  • 949
  • 1
  • 11
  • 21
  • 2
    Use command git cherry. It finds which commits have been cherry picked. – Guildenstern Apr 28 '23 at 16:32
  • 1
    This is a very meaty thread on cherry-pick; in fact perhaps too meaty for this question?: https://stackoverflow.com/questions/2922652/git-is-there-a-way-to-figure-out-where-a-commit-was-cherry-picked-from – Guildenstern Apr 29 '23 at 08:11

0 Answers0