Graphite Reviewer is now Diamond

Pull request vs merge request: Understanding the difference

Greg Foster
Greg Foster
Graphite software engineer
Try Graphite


Note

This guide explains this concept in vanilla Git. For Graphite documentation, see our CLI docs.


Understanding the difference between a pull request (PR) and a merge request (MR) can initially be confusing. While they seem similar, there are nuances depending on the platform used. This guide explains these terms clearly and highlights their similarities and differences. For more on code review practices, check out our guide: improving collaboration in code review processes.

A pull request (PR) is a way for developers to propose code changes to a project, commonly used on platforms like GitHub, Bitbucket, and Azure DevOps.

When you open a PR, you're asking the project maintainers to "pull" your changes into their codebase. Typically, you:

  1. Fork or branch the repository.
  2. Commit changes to your branch.
  3. Push changes to the repository.
  4. Create a pull request via the web interface or CLI.

The PR interface displays the differences between your changes and the target branch, enabling discussions, code reviews, and further commits before merging. For more detailed information about GitHub's code review process, see our guide on understanding code review in GitHub.

A merge request (MR) is GitLab's equivalent to GitHub's pull request. GitLab uses "merge request" because it emphasizes merging changes into another branch within the same repository.

The MR workflow in GitLab includes:

  1. Creating a feature branch from the main repository.
  2. Pushing the branch to GitLab.
  3. Opening a merge request through GitLab's interface.

The MR facilitates code reviews, threaded discussions, and integrated CI/CD pipeline testing. Like PRs, MRs are merged once all discussions and tests pass successfully. To learn more about GitLab's code review capabilities, check out our guide on enhancing GitLab code reviews with AI tools.

Although the purpose of PRs and MRs is nearly identical, there are some subtle differences:

AspectPull Request (PR)Merge Request (MR)
PlatformGitHub, Bitbucket, Azure DevOpsGitLab
Terminology originRequesting maintainers to "pull" changes inEmphasizes merging changes
WorkflowOften involves forks or branchesPrimarily branches within the same repo
Common use-caseOpen-source collaboration, forksInternal team projects, single repository
CI/CD integrationVia GitHub Actions, Bitbucket pipelinesIntegrated GitLab CI

In practical terms, a Git PR vs MR comparison reveals that both serve collaboration and code quality assurance, with workflows, approvals, and CI/CD checks in common. The naming difference largely reflects historical platform choices rather than fundamental functionality. For a comprehensive comparison of these platforms, see our detailed guide on GitHub vs GitLab.

Here's a simplified example of each workflow:

GitHub PR:

  • Fork/branch a repo
  • Commit and push changes
  • Create PR on GitHub, including a clear title and description
  • Review and collaborate through comments
  • Merge changes once approved

GitLab MR:

  • Create branch within the main repository
  • Push branch to GitLab
  • Open MR on GitLab with descriptive title and details
  • Collaborate through comments and CI tests
  • Merge changes upon approval

For more insights into effective code review practices, check out our guide on good code review etiquette.

Writing clear, descriptive PR/MR titles and descriptions is crucial but can be challenging. Tools like Graphite now provide AI-generated PR titles and descriptions. Graphite analyzes your changes and commits, automatically generating clear, structured summaries. Developers can review and adjust these AI-generated descriptions, saving time and ensuring clarity.

screenshot of ai pr description

Developers can refine this further, ensuring accuracy and clarity.

Ultimately, "pull request" vs "merge request" is mostly about naming preferences influenced by platform conventions:

  • Both enable robust code collaboration and quality assurance.
  • PRs are popularized by GitHub and Bitbucket, emphasizing pulling changes from external forks or branches.
  • MRs, used by GitLab, emphasize the merging action within the same repository.

Understanding these minor differences helps teams smoothly transition between platforms, optimizing collaboration irrespective of terminology.

Built for the world's fastest engineering teams, now available for everyone