Basically, your question boils down to βhow can I make changes to one branch, and then so that this change does not spread when I merged into another?β. It is quite simple. At the moment, I assume that your production branch is just a series of mergers, both from the dev branch and from the patch branch. Therefore, presumably doing git merge production in your development branch does not make any changes. With this in mind, continue and make changes to the manufacturing industry. Now lock them. Now browse through the development branch and run git merge -s ours production . This basically means "merge with production, but reject all their changes." This will create a merge commit, but will not really affect your development branch.
After this merge, you can now merge your production branch into development (or rather merge patch branches) without worrying, because your production commit is now merged into development (despite the fact that the changes themselves were rejected). Thus, combining your patch branches will not lead to production-only code.
Once you do this, the only time you ever need to go back and reapply this trick is if you make more changes just for production. If you make changes to the development branch that contradict your production changes, when you combine development into production, you can go ahead and take the production side of conflicts without any problems.
source share