Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does GitHub call foreign submissions, a "Pull Request"?

I'm curious why GitHub calls submissions to merge, "Pull requests."

From my understanding, git pull will pull all changes, from a remote repository, into a current working branch. Then merge those changes with FETCH_HEAD. (Git Pull)

So taking a look at git push... a push would actually push committed changes to a repository. And isn't that what you are doing with a Git repo? Submitting a "request" to merge your code? So why isn't it called a "Push request"?

like image 521
ddavison Avatar asked Feb 11 '13 17:02

ddavison


People also ask

Why does GitHub call it a pull request?

Pull requests are a GitHub and Bitbucket-specific feature that offers an easy, web-based way to submit your work, alternately called “patches,” to the project. The name “pull request” comes from the idea that you're requesting the project to “pull” changes from your fork.

Is Git pull a pull request?

If you use git pull , you pull the changes from the remote repository into yours. If you send a pull request to another repository, you ask their maintainers to pull your changes into theirs (you more or less ask them to use a git pull from your repository).

Is a pull request the same as a merge request?

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.


2 Answers

The term “pull requests” comes from the distributed nature of how many open source projects organize themselves. Instead of just pushing your changes into the repository (like you would do with a centralized repository, e.g. with Subversion), you are publishing your changes separately and ask the maintainer to pull in your changes. The maintainer then can look over the changes and do said pull.

like image 71
poke Avatar answered Sep 20 '22 06:09

poke


A pull request is when a contributor that does not have push access to a repository wants to submit code for inclusion in the project. For instance, if you have a project on github and you are the only person with commit rights and I want to include code in your project what do I do?

I'll fork your github repository and create a new branch for my work. Once I'm happy with the current implementation I'll send you a request to git pull my branch into your repository (since I don't have rights to push directly). When you do git pull you have the option of which branch to pull and where you want to pull to. Perhaps you don't want to pull directly into your master branch but into some other branch to examine the code.

The git book has a nice section on different work flows like this.

like image 39
asm Avatar answered Sep 21 '22 06:09

asm