Pull Request vs. Merge Request: What's the Difference?

Pull Request vs. Merge Request: What's the Difference?

Julien Danjou

One of the most well-known and often-used git tools, the pull request is often also referred to as a merge request. These git-based requests are often utilized to promote cooperation and collaboration between software team members. They’re normally a required feature used by mid-sized or large teams.

But what’s the difference between the two? Is there a difference?

Pull request vs. merge request

Essentially, these requests are nothing more than a short message to someone with a description of changes made to a branch. By sending a pull request or merge request, you’re asking the receiver of the request to review those changes prior to merging them into another branch.

GitLab merge request

There’s often confusion between terms pull request vs. merge request. That confusion lies in the fact that a pull request and a merge request are actually one and the same—but they differ depending on which sites they’re used. According to GitLab Docs:

“. . . GitHub and Bitbucket choose the name “pull request” because the first manual action is to pull the feature branch. Tools such as GitLab and others choose the name “merge request” because the final action is to merge the feature branch.”

Now that you know the difference (or lack thereof), let’s go a little deeper. For clarity’s sake, we’ll just be referring to them as “pull requests” throughout this article.

The benefits of pull requests

Many people wonder why you would use a specific tool for something that can be completed with a git command. There are three major benefits of using a pull request.

Communication between developers

The first is that you can easily summarize software features and fixes into identifiable containers, aka service providers like GitHub or Bitbucket. It also enables development teams to leave comments and view changes in one place.

This allows them to avoid miscommunication through email or other communication channels. Lastly, you’re able to gain better understanding as to how effective your team is.

Accessibility to merge tools

No matter which service provider you use, the pull request will contain a pointer to the main branch, allowing you to distinguish and compare the code in your feature or fix branch. You are also afforded the ability to merge the feature or fix branch into your main branch.

On top of that you should also have access to merge tools. A pull request will provide you with a meeting place, where team members are able to communicate regarding the feature or fix branch. Any pushes to that branch are then tacked by the pull request.

Clear history of changes

A major highlight of using a pull request is that the team will be able to see any changes between the main branch and the feature branch. Additionally, any discussions are recorded and stored in chronological order.

Pull request GitHub best practices

Start slow

If you want to start using pull requests to create a sense of structure to your git flow, you should begin with an introductory trial period. Start by choosing a couple of professional developers who understand git, as well as your git tool, such as GitHub. Allocate them to one fix or feature and test the waters.

Keep things simple

No matter whether they’re already a part of your git flow or if you’re just starting with pull requests, make sure you keep the focus on as few matters as possible. Keep the requirements for the fixes as simple as you can as well.

Separate each feature or fix

For mid-sized to large projects, it is best to create separate branches for every feature and fix. This way, the specific branch is tracked and discussed. Once considered for merging, it’s refined, then it can finally be merged or rejected.

When you click on the “Pull Requests” tab on GitHub, you’ll be able to see all the pull requests assigned to you that need reviewing. You’ll also see pull requests that require you to respond to any comments, and some that you may have been assigned to work on.

Stay informed

Other information that’s available to you includes which processes are opened, as well as the history of the pull requests that have been closed. Checking out the project history means that you’ll be able to go back and view the discussions and reasons that led to a particular code.

Understand your metrics

Another highlight is that you can view pull requests belonging to specific developers and uncover essential metrics regarding your particular project. This includes discovering which of them needed the most assistance, who took the longest to encode specific fixes, and who gave the best-quality feedback.

Get automated with Mergify

No matter what you call them, pull requests are simpler with Mergify. With a fully automated pull request process, you can stop waiting around for your code to merge—we’ve got bots for that!

Ready to get started? Sign up for your free plan today.