Github - merging commits pull requests to several branches

筅森魡賤 提交于 2021-02-08 08:27:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!