What is the difference between a Pull request and a Merge request.
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?
What is the difference between a Pull request and a Merge request.
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?
GitLab 12.1 (July 2019) introduces a difference:
"Merge Requests for Confidential Issues"
See "Confidential issues" from issue 58583.
A similar feature exists in GitHub, but involves the creation of a special private fork, called "maintainer security advisory".
As mentioned in previous answers, both serve almost same purpose. Personally I like git rebase and merge request (as in gitlab). It takes burden off of the reviewer/maintainer, making sure that while adding merge request, the feature branch includes all of the latest commits done on main branch after feature branch is created. Here is a very useful article explaining rebase in detail: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
GitLab's "merge request" feature is equivalent to GitHub's "pull request" feature. 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:
A "merge request" should not be confused with the
git merge
command. Neither should a "pull request" be confused with thegit pull
command. Bothgit
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.They are the same feature
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.
When Alice wants to "merge" her changes into B, she actually wants Bob to "pull" these changes from A.
Therefore, from Alice's point of view, it is a "merge request", while Bob views it as a "pull request".
There is a subtle difference in terms of conflict management. In case of conflicts, a pull request in Github will result in a merge commit on the destination branch. In Gitlab, when a conflict is found, the modifications made will be on a merge commit on the source branch.
See https://docs.gitlab.com/ee/user/project/merge_requests/resolve_conflicts.html