Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT: Whats the Difference between a Pull Request and a Merge?

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?

like image 788
xRavisher Avatar asked Jan 21 '14 01:01

xRavisher


People also ask

Why is it called a pull request and not a merge request?

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.”

When should I merge a pull request?

About pull request merges In a pull request, you propose that changes you've made on a head branch should be merged into a base branch. By default, any pull request can be merged at any time, unless the head branch is in conflict with the base branch.

Is GitLab merge request same as pull request?

GitLab's "merge request" feature is equivalent to GitHub's "pull request" feature. Both are means of pulling changes from another branch or fork into your branch and merging the changes with your existing code. They are useful tools for code review and change management.

What does it mean when a pull request is merged?

A pull request – also referred to as a merge request – is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository.


1 Answers

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.

like image 129
First Zero Avatar answered Oct 05 '22 22:10

First Zero