Pull Request vs. Merge Request

June 28, 2021
#Bitbucket#Analytics#How To
7 min
bitbucket code review

When it comes to choosing a Git management tool, you need to consider various factors as it significantly affects the workflow. One of the most important aspects is how collaboration is organized in this application. Pull Request in Bitbucket and GitHub or Merge Request in GitLab are the features made for more convenient code review. These features are equivalent as they both do the same git merge command to merge feature branches or forks with the existing code.

You probably want to ask why you need to use a special tool for something that a git command can do, but convenience and efficiency are what makes a difference here:

  • Your team ends up having a much higher quality code in your project as everyone on your team can check it and merge branches only after the code is good enough and meets your coding standards.
  • You get a well-organized process where you can leave comments and see the changes in one tool. So there’s no need to use emails and other communication channels to discuss features. It works perfectly, especially for distributed teams, no matter whether they are located – in different rooms or cities.
  • This feature allows you to get some insights into how effective your team is.

Working with Pull Requests in Bitbucket

Let’s look at how to use pull requests in Bitbucket and what information about your team performance you can get from it.

For instance, one of your developers has just finished working on a feature in a dedicated branch. Now, this feature should be merged with the development branch. But first, other team members should review it.

So, your developer navigates to Create pull request, chooses the feature branch as Source and the development branch as Destination. The developer can add the Title and Description of the pull request and choose who will be Reviewers of it or leave it without a particular reviewer.

create pull request in Bitbucket

Then a discussion of the feature begins. Each reviewer can:

  • see what files have been edited, what commits have been made
  • see what’s been changed since they last reviewed so that there’s no need to re-review everything again
  • add comments to the whole pull request or a particular code line and discuss it

comment pull request or code line in Bitbucket

  • decline a pull request or set Needs work status
  • merge a pull request and delete the source branch if needed.

merge pull request in Bitbucket

Working with Merge Requests in GitLab

Now let’s find out how to use the Merge Request feature in GitLab to improve the code review process.

Navigate to Merge Requests and click New merge request. 

create merge request in GitLab

Choose the Source branch that you want to merge and the Target branch which will be the destination.

merge source branch with target branch

Same as Bitbucket, GitLab allows you to choose who will review this request. It’s also possible to see the changes in edited files, the commits included in the merge request, discuss the feature, and make suggestions.

When reviewers approve the changes, click Merge to merge branches.

how to merge branches in GitLab

Insights on Your Team Performance in Bitbucket

While working in Bitbucket, you can also evaluate your team performance using the Awesome Graphs for Bitbucket app. It is possible to:

contributions report in Bitbucket

Improve your development process

Such collaboration while working on the project positively affects the quality of the code your team produces. Moreover, pull requests definitely reduce the number of bugs in the code.

As a result, the quality of your product gets better, and your customers become much more satisfied. Thanks to the detailed analysis of your team’s performance using Awesome Graphs for Bitbucket app, it’s possible to improve it and increase the speed of the development process.

Try it for your team!