Bitzu

GH-900 ยท Collaboration tools

How does a pull request work?

Opening a pull request, reviewers, review states (comment, approve, request changes), draft pull requests, and merge options (merge commit, squash, rebase).

Key points

  • A pull request proposes merging changes from one branch into another.
  • Reviewers can comment, approve or request changes.
  • A draft pull request signals unfinished work and cannot be merged.
  • When ready, it is merged with a merge commit, squash or rebase.

Source: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

Practice questions

Single choice

Which review choice tells the author that changes are needed before the pull request can proceed?

  1. Comment
  2. Approve
  3. Request changes
  4. Dismiss
Show answer

Answer: C. Request changes

Request changes flags required fixes. Comment gives feedback without a verdict and Approve signals acceptance.

Select all that apply

Which of these are merge options for a pull request?

  1. Merge commit
  2. Squash and merge
  3. Fork and merge
  4. Rebase and merge
  5. Cherry-pick and delete
Show answer

Answer: A. Merge commit, B. Squash and merge, D. Rebase and merge

GitHub offers merge commit, squash and rebase merges. The other two are not merge options.

True or false

A draft pull request can be merged as soon as it gets one approval.

Show answer

Answer: False

False. Draft pull requests cannot be merged at all until they are marked ready for review.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More GH-900 topics in this module