拉请求与合并请求
本文翻译自:Pull request vs Merge request
What is the difference between a Pull request and a Merge request. Pull请求和合并请求之间有什么区别。
In Github it's a Pull Request and in GitLab for example, it's a Merge Request... Is there a difference between both of these? 在Github中,它是一个Pull请求,例如在GitLab中,它是一个合并请求......这两者之间有区别吗?
#1楼
参考:https://stackoom.com/question/1V95M/拉请求与合并请求
#2楼
They are the same feature 它们是相同的功能
Merge or pull requests are created in a git management application and ask an assigned person to merge two branches. 合并或拉取请求在git管理应用程序中创建,并要求指定人员合并两个分支。 Tools such as GitHub and Bitbucket choose the name pull request since the first manual action would be to pull the feature branch. GitHub和Bitbucket等工具选择名称拉取请求,因为第一个手动操作是拉动功能分支。 Tools such as GitLab and Gitorious choose the name merge request since that is the final action that is requested of the assignee. 诸如GitLab和Gitorious之类的工具选择名称合并请求,因为这是受让人请求的最终操作。 In this article we'll refer to them as merge requests. 在本文中,我们将它们称为合并请求。
-- https://about.gitlab.com/2014/09/29/gitlab-flow/ - https://about.gitlab.com/2014/09/29/gitlab-flow/
#3楼
GitLab's "merge request" feature is equivalent to GitHub's "pull request" feature. GitLab的“合并请求”功能相当于GitHub的“拉取请求”功能。 Both are means of pulling changes from another branch or fork into your branch and merging the changes with your existing code. 两者都是将更改从另一个分支或分支拉入分支并将更改与现有代码合并的方法。 They are useful tools for code review and change management. 它们是代码审查和变更管理的有用工具。
An article from GitLab discusses the differences in naming the feature: GitLab的一篇文章讨论了命名功能的不同之处:
Merge or pull requests are created in a git management application and ask an assigned person to merge two branches. 合并或拉取请求在git管理应用程序中创建,并要求指定人员合并两个分支。 Tools such as GitHub and Bitbucket choose the name pull request since the first manual action would be to pull the feature branch. GitHub和Bitbucket等工具选择名称拉取请求,因为第一个手动操作是拉动功能分支。 Tools such as GitLab and Gitorious choose the name merge request since that is the final action that is requested of the assignee. 诸如GitLab和Gitorious之类的工具选择名称合并请求,因为这是受让人请求的最终操作。 In this article we'll refer to them as merge requests. 在本文中,我们将它们称为合并请求。
A "merge request" should not be confused with the git merge
command. 不应将“合并请求”与git merge
命令混淆。 Neither should a "pull request" be confused with the git pull
command. 也不应该将“拉取请求”与git pull
命令混淆。 Both git
commands are used behind the scenes in both pull requests and merge requests, but a merge/pull request refers to a much broader topic than just these two commands. 两个git
命令都在拉取请求和合并请求的幕后使用,但合并/拉取请求指的是比这两个命令更广泛的主题。
#4楼
In my point of view, they mean the same activity but from different perspectives: 在我看来,它们意味着相同的活动,但从不同的角度来看:
Think about that, Alice makes some commits on repository A, which was forked from Bob's repository B. 考虑一下,Alice在存储库A上做了一些提交,它是从Bob的存储库B派生的。
When Alice wants to "merge" her changes into B, she actually wants Bob to "pull" these changes from A. 当Alice想要将她的变化“合并”到B时,她实际上希望Bob从A“拉”这些变化。
Therefore, from Alice's point of view, it is a "merge request", while Bob views it as a "pull request". 因此,从Alice的角度来看,它是一个“合并请求”,而Bob将其视为“拉取请求”。
#5楼
GitLab 12.1 (July 2019) introduces a difference: GitLab 12。1(2019年7月)引入了一个区别:
" Merge Requests for Confidential Issues " “ 合并机密问题请求 ”
When discussing, planning and resolving confidential issues, such as security vulnerabilities, it can be particularly challenging for open source projects to remain efficient since the Git repository is public. 在讨论,规划和解决机密问题(例如安全漏洞)时,由于Git存储库是公共的,因此开源项目保持高效尤其具有挑战性。
As of 12.1, it is now possible for confidential issues in a public project to be resolved within a streamlined workflow using the Create confidential merge request button, which helps you create a merge request in a private fork of the project. 从12.1开始,现在可以使用“创建机密合并请求”按钮在简化的工作流内解决公共项目中的机密问题,该按钮可帮助您在项目的私有分支中创建合并请求。
See " Confidential issues " from issue 58583 . 请参见问题58583中的 “ 机密问题 ”。
A similar feature exists in GitHub, but involves the creation of a special private fork, called " maintainer security advisory ". GitHub中存在类似的功能,但涉及创建一个称为“ 维护者安全建议 ”的特殊私有分支。