Last Updated: February 25, 2016
·
265
· flavio

Git, how to choose a commit from one branch and apply to another

Sometimes you are working on a Git feature branch and you fix something you’d like to have on the master branch too, for immediate deploy. How do you merge that into master without having to take care of all the other commits made on that branch?

Solution: cherry pick!

git checkout master
git cherry-pick <SHA#>