Manuals / Git & GitHub / Ch 4

B · CollaborateBeginner40 min read

4. Pull requests & code review

Git & GitHub · 48 pages source format

PRs are conversation + integration. Clear description, test plan, small diffs. Review others generously.

What you'll learn

  • Open PR from branch
  • PR description template
  • Review comments
  • Merge strategies

Open your first PR

Push branch → GitHub "Compare & pull request" → fill title, summary, test plan.

  • Title: imperative summary
  • Body: what changed and why
  • Test plan: how you verified

Do this now

Open PR on git-practice. Self-merge after checking diff.

Clear?

PR hygiene

Small PRs review faster. One logical change. Link issue if applicable. Draft PR for WIP.

Do this now

Revise a PR description to include test plan checklist.

Clear?

Merge on GitHub

Merge commit vs Squash vs Rebase — team policy varies. Squash keeps main history clean for small teams.

Do this now

Merge your PR. Delete branch on GitHub. git pull locally.

Clear?

Checklist