Reputation: 14198
I have a master (production) and a staging branch. When I start a new feature I add a new branch based on staging. This feature branch then gets merged back to staging and deployed to a staging environment (web server)
Let's assume there are 5 new features merged to the staging branch and the feature branches are deleted. QA approves 3 of the features for production. Normally I would merge staging to master, but how can I selectively merge features to production and exclude others when I merge staging?
Upvotes: 2
Views: 458
Reputation: 24406
You can cherry pick specific commits into your branch:
git checkout master
git log staging
# Identify which commits you want to bring over
git cherry-pick COMMITHASH
Upvotes: 1