问题
We added a flow of mandatory pull requests when pushing code to our 3 main branches - dev, releaseCandidtae and production.
the flow is: dev -> feature-branch -> pull request and merge back to dev merge\cherry pick to releaseCandiadte branch merge\cherry pick to production branch Sometimes the feature branch is a fix and go out from production branch and cherry picked back to dev.
I understand that the code base might be different but is there a way to merge a commit to a all branches with one pull request? Maybe there a better way to build the branches hierarchy for that process? currently all went out from master branch. Thanks
回答1:
The flow you describe sounds a bit unusual to me and I'm not sure in what cases you plan to merge to all branches. The more common flow, git-flow, allows the concept of a "cascading merge," which is supported by some services.
Bitbucket, for example, supports automatic cascade merges, as you can read about here. https://confluence.atlassian.com/bitbucketserver/automatic-branch-merging-776639993.html
As far as I know, GitHub does not support it. Most likely because it's not a useful feature for GitHub-flow.
This question and answer is related. What's the practice for Github cascading merge?
来源:https://stackoverflow.com/questions/58398268/github-merging-commits-pull-requests-to-several-branches