I have a master branch which only gets deployed to production (A is currently deployed). Now we have a feature which is not fully developed (B,C) and has been committed to master. There is a prod issue which we need a fix and deployment(D). What is the best strategy to deploy the fix without affecting the current development?
We can revert to A then commit D and deploy in prod. Then cherry-pick B,C on top of D and continue development. Is my strategy going to work?
Or how to put D in between A and B?
A-B-C-D
CodePudding user response:
Revert, then revert the reversions later.
You can revert your un-deployed commits to clear them from master. You can then commit your patch and deploy that. Then you can simply revert the revert commits to re-implement them, then deploy.