I'm struggling with finding the best branching model for my team and would like advice on what branching models will work best.
We have 2 enviroments - Test & Production. I recently started to work with "nvie gitflow" with my team, without the release branches - so we have a develop branch that is the Test enviroment, which all feature branches are merged to it, and master which represents our production environment.
When a developer finishes a feature - he creates a pull request and merge it to the develop branch, and after the merge a new release is deployed to Test enviroment.
When the QA team approves the feature, we cherry-pick all the commits from the pull request and creating a new pull request, now to master. We do that in order to control which changes will be deployed to production.
Everything works really good except the cherry-pick to master - we often deploy code that depends on other code which is not on master, and our deployment fails.
I look for a way which we can control the code that is deployed to Production but also handle the dependencies between code sections. I tried to merge the feature branch to master but in this way a lot of unneccsary changes are committed also.