Cherry-pick means “treat this arbitrary commit as though it were a set of edits, and try to perform those same edits on the current code (which presumably has never had those edits applied before).”
So, if the commit added a new function and changed another function to call it, cherry-picking would make a new commit on your current branch to add that new function and call it.
It’s a speculative history re-write: “what if I had made those edits here and now, instead of on another branch somewhere?”
If those edits wouldn’t have made sense on the current branch (like, the file you added the function to is gone), then you get a conflict and probably want to abort, since you’re probably outside the set of situations where cherry-picking would save you any time or effort.
no subject
Cherry-pick means “treat this arbitrary commit as though it were a set of edits, and try to perform those same edits on the current code (which presumably has never had those edits applied before).”
So, if the commit added a new function and changed another function to call it, cherry-picking would make a new commit on your current branch to add that new function and call it.
It’s a speculative history re-write: “what if I had made those edits here and now, instead of on another branch somewhere?”
If those edits wouldn’t have made sense on the current branch (like, the file you added the function to is gone), then you get a conflict and probably want to abort, since you’re probably outside the set of situations where cherry-picking would save you any time or effort.