How do I move a commit between branches in Git?
You can use git cherry-pick to grab C, and put it on Y. Assuming Y exists as the tip a branch called branch-Y: $ git checkout branch-Y $ git cherry-pick C So now C is on top of Y. But D and E also still contain C (cherry picking doesn’t move a commit, it just … Read more