The Beauty of Cherry Pick

I’m loving the cherry pick command in git right now, this is the scenario that it really helps me out for.

I’ve fixed a bug on the live branch, however before it can be published to the live website it needs to be tested. So I can first publish it to our UAT (user acceptance testing) site so the client can test the changes. However the UAT site already has a bunch of other unreleased features on it. If I merge my bug fix branch into the UAT branch it will overwrite some of the other feature changes.

The solution here is to ‘cherry pick’ just my changes from my bug fix branch and commit those to the UAT branch. In this way git doesn’t merge all the other differences between the live and UAT branch.


Copyright © 2016 - Hook Technologies Ltd - Powered by Octopress