GitHub pull requests
This course covers GitHub pull requests, the layer GitHub adds on top of Git so a branch can be reviewed before it merges. It starts with opening a pull request from a pushed branch: base and compare branches, titles, descriptions and drafts. It then covers reading the diff, leaving inline comments and suggestions, and responding to feedback with new commits. Later lessons explain approvals, required status checks, branch protection and rulesets, followed by the three merge strategies. The last lesson takes one pull request from branch to local cleanup.
What you'll learn
- ✓Opening a pull request with base and compare branches, a clear description and drafts
- ✓Reviewing diffs with inline comments, suggestions and batched reviews
- ✓Responding to feedback by pushing commits and resolving conversations
- ✓Approvals, required status checks, branch protection rules and rulesets
- ✓Choosing between merge commit, squash and merge, and rebase and merge
- ✓Cleaning up branches on GitHub and locally after a merge
What a pull request actually is
Every merge in the last course happened on the command line. You decided the branch was ready, you ran git merge, and nobody else was involved. That works for a solo project. It breaks down once a second person needs to see the code before it lands on main. "Someone reviews this before it merges"…
Read the full lesson free →Curriculum
7 lessonsWhat a pull request actually is
A pull request is a GitHub feature that wraps git merge in review, discussion and automated checks.
Opening a pull request
Open a pull request from a pushed branch, choosing base and compare, writing a description, or using drafts.
The diff view and inline comments
Read the Files changed diff, comment on specific lines, propose suggestions and batch comments into one review.
Responding to review feedback
Push fixes to the same branch, reply with commit hashes, resolve conversations and request another review.
Approvals, required checks, and branch protection
Approvals, required status checks, branch protection rules and rulesets keep the merge button disabled until requirements pass.
Merge strategies on GitHub: merge, squash, and rebase
Compare merge commits, squash and merge, and rebase and merge, plus automatic deletion of merged branches.
Putting it all together: open, review, and merge a real pull request
Run one pull request end to end, from branch and review to squash merge and local cleanup.