Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does git cherry-pick save any metadata?

Tags:

git

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?

like image 656
Maic López Sáenz Avatar asked Jan 23 '13 20:01

Maic López Sáenz


1 Answers

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.

like image 156
Eevee Avatar answered Sep 18 '22 08:09

Eevee