Course progress0%
Course content
45 min

Open and Update a Pull Request

Propose a branch, explain it and respond to feedback

By the end of this lesson

  • Explain what a Pull Request requests
  • Improve the same branch after review feedback

A Pull Request is a conversation before integration

Yassine pushed his branch. The work is online, but it is not part of main.

A Pull Request asks:

Can the team review the changes from this branch and integrate them into the target branch?

feature/add-contact-link
          |
          | Pull Request
          v
        main

The words "Pull Request" do not mean running git pull. One is a GitHub collaboration page; the other is a Git command that updates a local branch.

Open a clear Pull Request

On GitHub:

  1. Choose main as the base branch.
  2. Choose feature/add-contact-link as the compare branch.
  3. Read the changed files.
  4. Write a clear title.
  5. Explain what changed, why and how it was checked.
  6. Link the relevant issue if the team uses one.

Example:

Title: Add contact link to navigation

Adds a Contact link to the main navigation and points it to the
existing contact section.

Checked with keyboard navigation and at mobile width.

A review comment is not a rejection

A teammate may ask Yassine to make the link label clearer. Yassine stays on the same branch, makes the correction and creates another commit:

git add index.html
git commit -m "Clarify contact navigation label"
git push

The existing Pull Request updates automatically because it follows the branch. Do not open a new Pull Request for every review correction.

Read before asking for review

Check the Pull Request's Files changed tab. Remove unrelated changes and explain anything surprising. A small Pull Request is easier and safer to review.

What to remember

A Pull Request proposes branch changes to a target branch. It explains the intention, shows the difference and creates a place for review. New commits pushed to the same branch update the same Pull Request.

Lesson complete?

Your progress is saved on this device.