Given a commit that is cherry-picked into master from a branch, and later that branch is merged back into master:
How does git know that the changes coming from the previous cherry-pick should not collide with the changes from the merge? Is any sort of metadata saved with the cherry-picked commit?
No, and there's nothing special about the act of cherry-picking, either. Git will always notice when the exact same change has been made on either side of a merge. The commits don't even have to look anything alike; as long as some chunk of text started the same way and ended up the same way, there's no reason to mark it as a conflict.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With