35

On services like Bitbucket and Github, one has the option to create a Pull Request and a Merge. What are all of the differences between the two?

Differences I currently know of:

  • Ability to approve or reject request
  • Ability to provide add a descriptive message with the request

Other than that it seems like a pull request is just essentially a merge.. correct?

Atul KS
  • 908
  • 11
  • 21
xRavisher
  • 838
  • 1
  • 10
  • 18

2 Answers2

42

Yes that is correct, the pull request on GitHub and Bitbucket is a request to merge two branches.

One of the use cases is to have a QA person who is not the developer review and approve the merge request.

Another use case is development on master branch is not allowed. A developer always develop on another branch. Once the development is completed, a pull request is created to merge into master branch.

First Zero
  • 21,586
  • 6
  • 46
  • 45
  • I would add to this that, `merge`'s can be quite small level like if you were to create a feature branch on a dev branch and merge iterations of that feature one at a time back into dev but a `pull request` would be used for merging that feature on dev into the production branch. A kind of check & balance to make sure nothing goes catastrophically wrong when merging into production. – ConstantFun Dec 26 '19 at 08:35
11

A "pull request" is a request to an upstream repository to merge some changes into their code ("pull changes from my repository and add them to yours, please"). So it's not really like a merge at all -- it's a request to merge.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • 7
    Pull request (on GitHub) and Merge request(GitLab) are meant for the same thing. See https://stackoverflow.com/questions/22199432/pull-request-vs-merge-request – S S Oct 26 '18 at 08:31