简体   繁体   English

Azure devops 拉取请求不要合并其他人的提交

[英]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.

相关问题 拉取请求显示在 azure devops 中变基/合并到另一个分支后的旧提交 - Pull request shows old commits after rebase/merge to another branch in azure devops 我们可以从 Azure Devops 管道提出并合并拉取请求吗? - Can we raise and merge a pull request from Azure Devops pipelines? 如何在git中合并其他人项目的拉取请求? - How do I merge a pull request on someone else's project in git? 从Dev到Master的Azure DevOps Pull Request正在获取旧代码 - Azure DevOps Pull Request from Dev to Master is fetching old code 撤消 git rebase/merge/commits to pull request - Undo git rebase / merge / commits to pull request 在 GitHub 中合并下游提交(不等待拉取请求) - Merge downstream commits in GitHub (not waiting for a pull request) Github请求请求排除'合并分支'提交 - Github pull request exclude 'merge branch' commits 将拉取请求附加到其他人的问题 - Attach a pull request to someone ELSE's issue 如果github告诉我“通过在...上推送到master分支来添加更多提交,如何将提交添加到某人发送给我的请求中?”? - How do I add commits to a pull request someone sent me, if github tells me “Add more commits by pushing to the master branch on…”? 拉取请求是否接受来自源分支的未来提交 - Do pull request accept future commits from the source branch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM