Collaboration & GitHub · 7 min read · Beginner
Pull Requests & Code Review
Ship production code with feature branches, focused Pull Requests, squash merges, and constructive code reviews.
What you'll learn
- Follow the standard GitHub Flow from branch to Pull Request
- Write clear PR descriptions with context, screenshots, and test notes
- Choose between merge commit, squash-and-merge, and rebase
In professional engineering teams, developers rarely push directly to main. Instead, changes go through a Pull Request (PR) so automated CI checks and teammates can review the diff first.
The GitHub Flow
- Pull the latest
main. - Create a short-lived feature branch (
git checkout -b fix/navbar-gap). - Make small, tested commits and push your branch.
- Open a Pull Request describing what changed, why, and how you tested it.
- Address review feedback, pass CI checks, and merge (often via Squash and Merge to keep
mainhistory tidy).
Fill-in-the-Blank Exercise
Reviewing Changes Before Opening a PR
Create a fix branch and inspect your commit summary before opening a Pull Request.
git checkout -b fix/button-icon
git --onelineTry It Yourself (Interactive Git Terminal)
GitFeature Branch for Pull Request
main
(main) $ git status
On branch main Untracked files: index.html, styles.css
Check Your Understanding
Score: 0 / 1
1. Why do many teams use Squash and Merge on GitHub Pull Requests?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.