CH.14 · PART 3

Show the change.
Invite review.

A branch becomes a proposal. Check the destination, explain the change and review the diff.

LOCALSHAREDCheck where the work goes.

A pull request is a conversation about a change

A pull request proposes merging one branch into another on GitHub. It shows commits, a diff, checks and discussion. It is not the same operation as git pull, and opening it does not automatically merge or deploy anything.

Base receives. Head supplies.

Base: main

The branch you want to update.

Head: feature/greeting

The branch containing your proposed changes.

Repository

Check the owner too. A fork can have the same branch names in a different repository.

Build the proposal

  1. Commit and test the change on a branch.
  2. Push that branch to a repository where you have access, or to your fork.
  3. Open GitHub's Pull requests page and choose New pull request.
  4. Check the base repository and branch, then the head repository and compare branch.
  5. Read the entire diff. Remove accidental files or secrets before publishing.
  6. Write a clear title, explain what changed and how you tested it. Use a draft when work is not ready.

This is a documentation-based walkthrough, not screenshots of a live repository. Exact button placement can change.

Try a useful PR description

Add greeting #12
Open ada wants to merge 1 commit into main from feature/greeting
ConversationCommits 1Files changed 1
ada commented
The description box. This is where your What changed / Testing text lands. Reviewers read it first.
Illustration drawn for this course, not a real screenshot. GitHub changes its design, so button positions may differ.

Write like a reviewer is reading it. The feedback below updates as you type and is only a coaching aid. It cannot judge whether your facts are true.

  • Start typing and I will point out what a reviewer would miss.
Your private practice draft appears here. Nothing is sent.

Practice: send a branch up for a pull request

hands-on

Clone, branch, commit and push a new branch. GitHub answers a first push of a branch with a link to open the pull request.

1

Loading

practice terminal · bash-style

Review is more than a green button

Check correctness, unintended files, tests, accessibility and the destination. Respond to feedback with commits on the same head branch; the PR updates. Passing automated checks is evidence, not proof that the change is right.

Merge only when the repository's review and branch rules allow it. Merge commit, squash and rebase merge preserve history differently. Do not pick a method just because a button is visible. Deployment behavior belongs to that repository's configuration.

If you cannot open or merge it

Check access, whether the branches actually differ, and repository rules. A contributor may be allowed to propose work but not merge it. Ask a maintainer rather than bypassing protected-branch rules.

Quick check

1 / 3

Pick an answer.

Source

GitHub: Creating a pull request

Stuck? Go deeper

optional