The below screenshot shows the result of running git cherry-pick <hash>
while on branch master
.
This operation is picking up two commits instead of a single commit. I don't understand why this is the case and wonder if this is a git
bug. I am running version 2.30
.
git cherry-pick a2a037f311 --no-commit
The next screenshot shows the commit log from the branch from which I am cherry-picking.
Finally, here's a diff between two consecutive commits.
git diff 2bad... a2a0...
Here's some details about the branch being cherry-picked from.
It could be I've misunderstood something, but it seems to me the only thing that should be added from this single cherry-picking operation is the line
Include this change!
The only possible thought I have is that by picking a commit in the middle of a branch history, this for some reason creates a conflict with the previous commit. But that explanation doesn't seem to really make much sense given the details of the conflict shown here.
I would have expected:
- No conflicts to occur from the cherry-pick
- A single line
Include this change!
to be added tomaster
branch
Why didn't that happen?