Basically, Pull Requests and Merge Requests are, in the end, the same thing, but some differences must be appreciated, especially in the way you open new ones. The first one is the most obvious: Pull Requests are found in GitHub and Bitbucket since Merge Requests are found in GitLab.

When you have to choose a System Control Management (SCM) git tool, you have to consider different factors since they will have a significative impact on the workflow of your engineers.

Some of the benefits of using Pull/Merge Requests are:

  • Cleaner and organized code
  • Better code structure
  • Encouragement of making code reviews
  • Improve the workflow of your engineers
  • Better communications within teams
  • You can obtain insights of you or your engineer’s workflow using Scope!

If you are following the gitflow workflow, probably the SCM will not be as important as if you use the Pull Request or Merge Request methodology, which is much more recommended than using gitflow.

So, let’s start explaining what is a Pull Request and Merge Request in git.

What is a Pull Request and Merge Request in git?

Basically, pull requests and merge requests are requests (forgive the redundancy) to make some changed in the code. This allows you to:

  1. Discuss the potential changes
  2. Review those changes
  3. Create a communication workflow with your teammates
  4. Follow-up commit before your changes are merged in the base branch

How to open a Pull Request or Merge Request?

In GitHub, you have several choices to open a Pull Request. You can do it directly from the web app of your SCM, or you can do it using code editors like VSCode, WebStorm, and etc. We are going to explain how to open Requests through the SCMs. To do it, first of all you have to create a new branch to compare from the terminal. To do that, follow these steps:

  1. Go to your repo cd RepositoryFolder
  2. Open a new branch from the branch you want to compare with using git checkout -b <name of the new branch>
  3. Make changes
  4. Commit those changes
  5. Push them with git push origin <new branch name>

Later, you have to go to your SCM.

How to open a Pull Request in GitHub?

Once you have opened a new branch through the terminal, go a GitHub Repository where you are working on and you will see a green pop-up:

Compare & Pull Request in GitHub
  1. Press Compare & Pull Request
  2. Add a title and a description that clearly explains what are you working on your new Pull Request
  3. We recommend you to use labels to better organize your code
Give title, description and a label to your new Pull Request
  1. Press Create Pull Request green button to create the new PR.
  2. You can keep committing to your new PR until you have finished the task.

How to open a Pull Request in Bitbucket?

The process is almost identical to the GitHub process. First of all, you have to create a new branch from the terminal using the commands we established before. Then you have to:

  1. Go to the Pull Request section.
  2. Open a new Pull Request with your committed changes
Create new Pull Request on Bitbucket
  1. Give a title and a description in the same way than
  2. Press Create pull request blue button
  3. You can keep committing to your new PR until you have finished the task.

How to open a Merge Request in GitLab?

The process is basically the same as with Pull Requests. The main difference is basically the name. Both are means of pulling changes from another branch to your branch and merge the changes with your existing code.

To create a Merge Request, you have to previously create the branch from the terminal with the steps we listed above. Later you have to:

  1. Go to the project where you want to merge your changes and click on the Merge Request tab.
  2. Click on New Merge Request green button.
Opening a new Merge Request in GitLab
  1. You can select the source branch and the target branch you want to compare to. The default is the upstream repository, but you can compare it across any of its forks.
  2. When everything is configured, click on the Compare branches and continue button.
  3. Add a title, description and a label in the same way as in GitHub or Bitbucket.
  4. Click on the Submit merge request button when you finish describing your Merge Request.
Give a title, description and label to your new Merge Request in GitLab

That’s all. It’s really easy to create new a Pull Request or a new Merge Request. The main difference is the name, since they belong to different SCMs, so it is all up to you to decide which one you want to work with to organize your code and workflow.

In Scope, we actually work with GitHub, GitHub Enterprise and GitLab (beta). Feel free to use what you like most!