There's something I don't understand when I rebase after cherry-picking in git. Would someone please tell me what's going on?
The scenario like this:
I am working on the master and topic branches as follows and the topic has two commits.
C---D topic
/
A---B master
I had a problem with the topic branch, so I decided to just cherry-pick D and merge it into the master. I create a release branch and cherry-pick it.
C---D topic
/
A---B master
\
D' release
I merge release into master.
C---D topic
/
A---B----E master
\ /
D' release
The base branch of the topic has changed, so I rebase it to the latest master.
C topic
/
A---B----E master
\ /
D' release
Finally, the commit of D
that cherry-picked disappeared from the topic.
This is the intended result for me. But I don't understand why git found them to be the same, even though the commit hashes are different.