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.
Practice questions
Which review choice tells the author that changes are needed before the pull request can proceed?
- Comment
- Approve
- Request changes
- Dismiss
Show answer
Answer: C. Request changes
Request changes flags required fixes. Comment gives feedback without a verdict and Approve signals acceptance.
Which of these are merge options for a pull request?
- Merge commit
- Squash and merge
- Fork and merge
- Rebase and merge
- 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.
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.
