My team has two GIT branches:
- 'main' branch which services our production environment
- 'update_1' branch which was forked out of main branch
The idea is that 'main' is our current production branch. We only allow small bug fixes to be added to this branch to resolve critical production issues. 'update_1' branch is the next release we are working on. This branch has larger feature items that take more time to develop and stabilize. Once development is complete in 'update_1', we will push this branch to production, and then fork a new 'update_2' branch out of 'update_1' branch to start working on the next update. 'main' branch will no longer be used once 'update_1' branch is pushed to production in its place.
Due to this branching model, any fix that is committed into 'main' branch, must also be integrated into 'update_1' branch, so we do not lose the fix when 'update_1' branch is pushed to production. Similarly, we need to integrate all fixes from 'main' and 'update_1' branch into 'update_2' branch (once it is created), so we do not lose any of our in-production fixes once 'update_2' branch ships to production.
Currently, this is a manual process. We have our developers cherry-pick their changes into the needed branches. This has a lot of overhead and often times delays while we wait for the dev to integrate their fix into the needed branch. I am looking to automate this processes.
Is there any scripts or automation that can resolve this issue? I need to integrate all commits that are in branch 'main' into branch 'update_1'. If there is a marge conflict, we would need to flag this commit for developer review.
Thanks!