[英]Azure devops Pull request do not merge commits from someone else
I have one branch which we are using for development.我有一个用于开发的分支。 Team raise PR to merge the changes in master branch.团队提出 PR 以合并 master 分支中的更改。
User 1 raise PR -> Dev to Master Checks validation is in progress Build in progress用户 1 提出 PR -> Dev 到 Master 检查验证正在进行中
User 2 commit other changes Now these changes would get merge into the above PR itself.用户 2 提交其他更改 现在这些更改将合并到上述 PR 本身中。
We want to restrict this behavior.我们想限制这种行为。 We want separate PR for separate user and want to get those merged into the separately.我们希望为单独的用户提供单独的 PR,并希望将它们合并到单独的 PR 中。
Adapt a feature/topic branch workflow, so that the developers work in isolation in their own feature branches and do PR:s to either develop or master -branch (depending on if you need to isolate the whole sum of work from main branch).调整功能/主题分支工作流程,以便开发人员在他们自己的功能分支中独立工作,并对开发或主分支执行 PR:s(取决于您是否需要将整个工作总和与主分支隔离)。 Protect the branch that developers merge PRs into with branch policies.使用分支策略保护开发人员将 PR 合并到的分支。
For example:例如:
https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
If you then need to do PR's from develop to master for certain changes only, you can cherry pick the original pull request, which in essence creates a new topic branch a pull request from it to master.如果您随后只需要针对某些更改进行从开发到主控的 PR,您可以挑选原始的拉取请求,这实质上会创建一个新的主题分支,从它到主控的拉取请求。 But that tends to get rather tiresome soon.但这往往很快就会变得相当烦人。
https://docs.microsoft.com/en-us/azure/devops/repos/git/cherry-pick?view=azure-devops&tabs=visual-studio https://docs.microsoft.com/en-us/azure/devops/repos/git/cherry-pick?view=azure-devops&tabs=visual-studio
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.