简体   繁体   English

我们可以同时提出两个主分支的拉取请求吗

[英]Can we raise two Pull request for master branch concurrently

I have a confusion with GIT.我对 GIT 感到困惑。 Query - I have Feature1 and Feature2 branch cloned from MASTER branch.查询 - 我有从 MASTER 分支克隆的 Feature1 和 Feature2 分支。 Respective changes and code has been committed and synced to respective branch in a GIT BASH相应的更改和代码已提交并同步到 GIT BASH 中的相应分支

For Feature 1
git checkout master
git pull origin master
---resolve conflicts if any
git checkout Feature1
git merge master

Raised a Pull Request 1 for Feature 1 branch to move changes to Master (Feature1 ---> Master) At the time of raising PR, Should I wait for Pull request 1 to be approved and completed before raising Pull Request 2 for feature 2 branch为功能 1 分支提出拉取请求 1 以将更改移动到主(功能 1 ---> 主) 在提出 PR 时,我是否应该等待拉取请求 1 获得批准并完成,然后再为功能 2 分支提出拉取请求 2

For Feature 2
git checkout master
git pull origin master
---resolve conflicts if any
git checkout Feature2
git merge master

OR Can I raise PR simultaneously for both the Feature branch and expect that there will be no merge conflicts.或者我可以同时为 Feature 分支提出 PR 并期望不会有合并冲突。

My Understanding - I always think that this will create a issue because my Feature 2 branch PR will not be having the latest commit from master branch which was moved after the PR for Feature 1 branch was approved.我的理解 - 我一直认为这会产生一个问题,因为我的 Feature 2 分支 PR 不会有来自 master 分支的最新提交,该提交是在 Feature 1 分支的 PR 被批准后移动的。 Please let me know if this will be an issue.请让我知道这是否会成为问题。 I want to know the understanding for having two PR raised parallelly.我想知道同时提出两个PR的理解。 I have searched for same queries but none has given me the lucid understanding.我搜索了相同的查询,但没有一个给我清晰的理解。

multiple pull-requests are normal多个 pull-request 是正常的

Having multiple pull-requests at the same time open is completely normal and even medium sized projects would grind to an halt if this was not possible.同时打开多个拉取请求是完全正常的,如果这是不可能的,即使是中型项目也会陷入停顿。

In most cases you don't even get any conflicts when merging.在大多数情况下,合并时您甚至不会遇到任何冲突。 And should 2 PR change the same lines then you will get a merge conflict for the second PR.如果 2 个 PR 更改相同的行,那么您将遇到第二个 PR 的合并冲突。 You can just fix it and push the updated branch to update the PR.您可以修复它并推送更新的分支以更新 PR。

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

相关问题 我们可以从 Azure Devops 管道提出并合并拉取请求吗? - Can we raise and merge a pull request from Azure Devops pipelines? git clone pull request而不是master分支 - git clone pull request instead of master branch 如何将master合并为作为pull request提交的分支? - How to merge master into branch submitted as pull request? 拉请求插件将master合并到分支 - Pull request plugin to merge master into branch 从主分支恢复合并的拉取请求 - Revert a merged pull request from master branch 单独构建分支,并根据请求请求合并到主节点 - Build branch separately and merge into master on pull request 如何接受对分支机构的拉取请求(在 master 上完成)? - How to accept a pull request (done on master) to a branch? 无法创建提取请求以将功能分支合并到新创建的存储库中的master分支中 - Can't create a pull request to merge a feature branch into a master branch in a newly created repository Github 从开发分支到主分支的拉取请求显示以前的提交。如何避免此类问题? - Github Pull Request from Develop branch to Master branch shows previous commits .How can I avoid such issues? 当该分支上有一个开放的拉取请求时,我可以将我的分支与主分支合并吗? - Can I merge my branch with the master while there is an open pull request on that branch?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM