Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is a git 'pull request' not called a 'push request'?

The terminology used to merge a branch with an official repository is a 'pull request'. This is confusing, as it appears that I am requesting to push my changes to the official repository.

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

like image 817
Alejandro Sanz Díaz Avatar asked Feb 09 '14 09:02

Alejandro Sanz Díaz


People also ask

What is difference between pull request and push?

Hence, developers push the code to a different branch and then raise a pull request to merge the changes to master. An administrator then reviews the code changes in the pull request and then approves the request and merges the changes to master if the change looks good.

What is the difference between pushing and pulling in git?

Push: sends commits and asks them to update their branch. This requires that things be right on their end. This cannot combine parallel development. Pull: runs git fetch , which gets commits and has your Git update your remote-tracking name, then runs a second Git command to update your branch.

Why does git call it a pull request?

Pull requests are a feature specific to GitHub. They provide a simple, web-based way to submit your work (often called “patches”) to a project. It's called a pull request because you're asking the project to pull changes from your fork.

What is a push request in git?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.


2 Answers

If you have a code change in your repository, and want to move it to a target repository, then:

  • "Push" is you forcing the changes being present in the target repository (git push).
  • "Pull" is the target repository grabbing your changes to be present there (git pull from the other repo).

A "pull request" is you requesting the target repository to please grab your changes.

A "push request" would be the target repository requesting you to push your changes.

like image 103
Sven Avatar answered Oct 21 '22 11:10

Sven


When you send a pull request, you're asking (requesting) the official repo owner to pull some changes from your own repo. Hence "pull request".

like image 21
JB Nizet Avatar answered Oct 21 '22 12:10

JB Nizet