My current branch/pipeline strategy is as follows:
- master -> Production Branch
- dev -> development Branch
- feature/*, bugfix/* -> feature or bugfix branches off of dev branch
- release/* -> release branch off of dev branch
- hotfix/* -> quick fixes off of release branch
Feature branches are created off of the development branch and merged back in. On commits to the development branch, I've configured pipelines to automatically create a release/* branch off of the dev branch and commit to it. Then, on the release branch, pipelines deploys to a staging environment. Subsequently merging a PR from release/* to master will trigger a deploy to production.
This final commit/merge causes the master branch and the dev branch to become out of sync, forcing me to manually, within the Bitbucket UI, click "sync" from the dropdown menu on the dev branch.
I'd like to be able to automate this step with pipelines if possible. Ideally, a commit to master and a successful production deployment would automatically sync the dev branch with the master branch. Is something like this possible? It seems to be treated as a typical commit in the UI, but i was unable to re-create this functionality in pipelines using my intuition.