git merge after git cherry-pick: avoiding duplicate commits

Imagine we have the master branch and a branch b: o—X <– master \ b1—b2—b3—b4 <– b Now we urgently need the commits b1 and b3 in master, but not the remaining commits in b. So what we do is checkout the master branch and cherry-pick commits b1 and b3: $ git checkout master $Continue reading “git merge after git cherry-pick: avoiding duplicate commits”