Course Git & GitHub for Beginners

Pull Requests & Code Review

Collaboration & Workflow Preview

The pull request workflow

  1. Branch from main: git switch -c feature/xyz
  2. Commit and push your branch
  3. Open a pull request on GitHub
  4. Reviewers comment and approve
  5. Merge into main
  6. Delete the branch

Opening a PR

git push -u origin feature/xyz\n# then: github.com → Compare & pull request\n# describe what you did and why

What reviewers look for

  • Does it do what the description says?
  • Are there bugs or edge cases missed?
  • Is the code clear and consistent?
  • Are there tests?
  • Does it break anything?

Reviewing etiquette

  • Be specific: point at the line
  • Suggest, don't dictate
  • Compliment good work too
  • Keep feedback about the code, not the person

A perfect PR description

## What\nAdds dark mode to the settings page.\n\n## Why\nUsers asked for it; matches mobile app.\n\n## How tested\nManually on Chrome + Safari; added 2 unit tests.
Tip: A tiny PR (one feature, few files) gets reviewed fast. A giant PR gets postponed forever.

This is a free preview lesson

Enroll in the Git & GitHub for Beginners to unlock every lesson, lesson PDF guides, quizzes and your certificate - and start creating your own pieces today.


Discussion

Free preview lesson