[英]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.我搜索了相同的查询,但没有一个给我清晰的理解。
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.