简体   繁体   English

如何停止与开发分支合并的分支与主分支合并?

[英]How to stop a branch merged with develop branch to be merged with master branch?

During coding I create a feature branch from the develop branch. 在编码过程中,我从developer分支创建了一个Feature分支。 When everything is OK I merge this feature branch to develop branch. 一切正常后,我将此功能分支合并为开发分支。

Later for production deployment I merge this develop branch to maste r branch on production. 后来生产部署我这个合并开发分支马斯特生产[R分支。

Is there a way to prevent a feature branch merged in the develop branch to be merged with master branch. 有没有一种方法可以防止在develop分支中合并的功能分支与master分支合并。 That means when I merge my develop branch to master branch that particular branch should not be merged with master branch? 这意味着当我将自己的开发分支合并到分支时,该特定分支不应该与分支合并吗?

On my staging server I use develop branch and on production I use master branch.I had a task/code change that should be on staging only. 在我的登台服务器上,我使用开发分支,在生产上,我使用分支。我的任务/代码更改仅应在登台上进行。 It should not go to production that is on master branch. 它不应进入主分支上的生产。

I use bitbucket and source tree for the version control. 我使用bitbucket和源代码树进行版本控制。

This is not possible indeed. 确实不可能做到这一点。 But if you have already merged your feature branch in develop branch and for some reason if you don't want to merge changes to master branch, you can cherry pick changes from develop to master means you can put specific commits to master. 但是,如果您已经将功能分支合并到develop分支中,并且由于某种原因(如果您不想将更改合并到master分支),则可以从develop到master挑选变更,这意味着您可以将特定提交提交给master。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM