Pull Requests: You Better Use Them

Friday, 16 September 2016

Pull requests are a feature that most of repository hosting service provide such GitHub and Bitbucket. It’s a better way of submitting contributions to a project using a distributed version control system such as Git or Mercurial and it’s easier for developers to collaborate.

It is important to highlight that PRs are a workflow feature, and not a feature of the version control system itself. A Pull Request occurs when a developer asks for changes that were committed to an external repository. They are basically a mechanism for a developer to tell team members that they have completed a feature and it’s ready to be merged on other branch. Thus all team members that are notified of a new PR and can inspect1 it and merge it.

PR flow is basically:

  1. You make changes on your branch and pull it to your respective remote branch;
  2. Then, on its hosting service there is a link to create a pull request where you choose the repo which is the source of the modifications and the destination;
  3. The team members review your changes, discuss them, ask for changes, aprove them;
  4. When everything is fine, the project maintainer merges it;
  5. PR is closed.

Below there is a real example of one of my repos in GitHub: Facebook Link Preview. Some developers has forked my repo and pull-requested to it.

List of Pull Requests

List of Pull Requests

List of Pull Requests

Pull Request Flow

Pull Request Flow

Pull Request Flow

Pull Request Commits

Pull Request Commits

Pull Request Commits

Here are two links to know more:

  1. Including you, but it’s obviously not a good practice.
git
Audio Indicator Bars »