I am using Git/Heroku for a work application. Usually, changes will be merged into master then pushed to staging then production. But now I need to push only selected changes (patches) to production. How should I do that?
- Some initial state in master
- Patch 1
- Patch 2
- Patch 3
- Patch 4
- Patch 5
My first thought was to pull from heroku/production. Copy changes here (eg. a subset possibly from patch 2 and 4) and then only push into heroku production. I think this will work, in the short term. But in the future how do I manage such "divergent" changes? Since now master and production is different. When I push from master into production, I guess I will get conflicts? Either that or I will end up overriding changes made on production? How are such changes managed?