Git is hard: applying single commits to another branch

Want to apply just one commit from one branch into another branch? Don’t merge — that’ll bring in all the commits behind the one you want.

The secret is:

git cherry-pick 

To find the commit name, you can “git log “
To see the contents of the commit, you can “git show “

Be in the branch you want to change (git checkout ) and then use cherry-pick to bring in exactly the fixes you want.

Discover more from Jessitron

Subscribe now to keep reading and get access to the full archive.

Continue reading