Zum Inhalt springen

Pull Request and Git Flow

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

We encourage you to use pull requests as a collaboration technique across your project. Easy to review, easy to manage, and only the project maintainers/owners have permission to merge them.

A collaborative workflow based on pull requests provides many benefits:

  • The “hot” project repository requires only very few maintainers with full rights to sign off pull requests. Users can easily work on forked repositories.
  • Each pull request collects the full edit history for a fix or feature branch. Contributors can squash this, or keep it, just as they prefer.
  1. Clone the repository you want to work on:

    Terminal window
    git clone url
  2. Create a branch

    Terminal window
    git branch <branch-name>
  3. Do something in your branch.

    e. g. do some changes, commit and push them.

  4. Create a pull request

    Visiting the main repository page and clicking the New Pull Request button.
    In the screenshot, feature is the name of the branch:


    This button above is automatically shown if:

    • You are the pusher on a branch that still exists and that is not the default branch
    • The push has occurred within the last 6 hours
    • There is no open PR for this branch

Within the pull request page, the Files Changed tab shows a Review button that can be used to approve the pull request or request changes.

Next to each changed line, a +-button allows to add a comment on that specific line, for instance to suggest a modification.

When a pull request contains multiple commits, the button to the left of the Review button can be used to only review a single commit.