Git pull request

From Wiki @ Karl Jones dot com
Revision as of 13:07, 12 September 2016 by Karl Jones (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the Git (software) revision control system, a pull request is an interface for discussing proposed changes before integrating them into the official project.

Description

A pull request is a mechanism for a developer to notify team members that they have completed a feature. Once their feature branch is ready, the developer files a pull request. This lets everybody involved know that they need to review the code and merge it into the master branch.

A pull request is more than just a notification. it is a dedicated forum for discussing the proposed feature. If there are any problems with the changes, teammates can post feedback in the pull request and even tweak the feature by pushing follow-up commits. All of this activity is tracked directly inside of the pull request.

Structure

When you file a pull request, all you’re doing is requesting that another developer (e.g., the project maintainer) pulls a branch from your repository into their repository.

This means that you need to provide four pieces of information to file a pull request:

  • the source repository
  • the source branch
  • the destination repository
  • the destination branch

Typical usage

The typical process is as follows:

  • A developer creates the feature in a dedicated branch in their local repo.
  • The developer pushes the branch to a shared repository.
  • The developer files a pull request.
  • The rest of the team reviews the code, discusses it, and alters it.
  • The project maintainer merges the feature into the official repository and closes the pull request.

See also

External links