Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is a Pull Request a Git concept?

Is a "pull request" a core Git concept, or a value add provided by Git hosting platforms like GitHub and Bitbucket?

Is the discussion data stored on the cloud hosts proprietary platform or in something more generically Git?

like image 978
Kong Avatar asked Feb 13 '19 11:02

Kong


1 Answers

Yes and (mostly) no.

Pull requests are not stored in git. They are implemented by the hosting platform such as GitHub. However git's distributed design is built to handle the existence of a pull request, whatever mechanism is used to implement that request.

Other SCMs (such as SVN) can't easily allow an unknown third party to make changes and then submit those changes for approval. Git was designed for open source software where anyone can contribute, but those contributions need to be approved. So Git gets round the restriction by allowing a work flow such as:

  • A repository with read only public access can be cloned by (anyone) an unknown third party.
  • That third party can then make changes and (for example) host their own public read only repository.
  • The third party can then (for example) email the original owner to say "hi, please add my changes, they are hosted here: ..."
  • The original owner can pull the changes manually if they like them.

Here the "pull request" is is just an email.

Hosting platforms such as GitHub have formalised pull requests but also limited them to being hosted entirely on that platform.

None of this is implemented in the git repository itself, but the concept is core to Git's design.

like image 170
Philip Couling Avatar answered Sep 26 '22 17:09

Philip Couling