When doing git cherry-pick, remove the commit from the source branch then rebase the source branch with the destination branch. This introduces the cherry-picked changes before any of your branch specific code.
Last updated on by Sal Ferrarello
When doing git cherry-pick, remove the commit from the source branch then rebase the source branch with the destination branch. This introduces the cherry-picked changes before any of your branch specific code.
I’m curious, what issues have you seen with cherry picking? While I don’t use it everyday, I’ve used it plenty of times without issue. I would love to know about the potential drawbacks from real experience.
I’ve seen people get jammed up by cherry-picking a commit from a branch and then later trying to merge that branch and getting a merge conflict. The problem they encounter is the changes exist in two different commits (the original commit) and the commit created by the cherry-pick.
I like to delete the original commit and use the commit created by the cherry-pick only.