Skip to content

Lesson 07 — Pull Requests

Open a pull request so someone can review your branch before it is merged.

A pull request, or PR, is a request to merge one branch into another branch.

Most often:

your branch → main

A PR gives the team a place to:

  • Review changes
  • Ask questions
  • Suggest edits
  • Run automated checks
  • Approve and merge work

Make sure your branch is on GitHub:

Terminal window
git push -u origin branch-name
  • My branch is pushed to GitHub.
  • I opened the repository page.
  • I see my recently pushed branch.
  • Click Compare & pull request, or go to the Pull requests tab and click New pull request.
  • Confirm the base branch is main.
  • Confirm the compare branch is my branch.

Example:

docs: add practice notes to README
  • My PR title clearly says what changed.

Use this template:

## Summary
-
-
## Testing or review notes
- [ ] I reviewed the changed files
- [ ] I ran `git status`
- [ ] I confirmed the change appears as expected
  • I wrote a short PR description.
  • I clicked Create pull request.

If someone asks for a change:

  1. Make the change locally on the same branch.
  2. Commit it.
  3. Push it.
Terminal window
git add filename
git commit -m "docs: address PR feedback"
git push

The PR updates automatically.

  • I understand how to update a PR.
  • I can open a PR.
  • I can explain what branch is being merged into what branch.
  • I can update a PR by pushing another commit to the same branch.
  • I understand that PRs are for review and discussion.