How to Approve a Pull Request on GitHub

When working on a collaborative project on GitHub, developers create pull requests (PRs) to propose code changes. These pull requests must be reviewed — and approved — before merging into the main branch.

Approving a pull request not only signals that the code changes look good but also helps maintain code quality, consistency, and security in team projects.

In this guide, we’ll explain what a pull request is, why approvals matter, and how you can review, comment on, and approve a pull request on GitHub (both web and desktop).

What Is a Pull Request on GitHub?

A pull request (PR) is a feature that lets developers notify others that they’ve pushed new changes to a branch in a repository. It allows the team to review, discuss, and approve changes before merging them into the main branch.

When a developer opens a pull request, they’re essentially saying: “Here are the changes I made — please review and approve them before merging.”

Pull requests are commonly used to:

  • Collaborate with other developers.
  • Review code for bugs or performance issues.
  • Maintain code integrity before merging.

Why Approval Matters

Approving a pull request helps ensure the following:

  • The code works as intended.
  • It follows project standards.
  • It doesn’t introduce new bugs.
  • It’s reviewed by at least one other team member.

In larger organizations, PR approvals are mandatory before merging — helping teams maintain clean, stable main branches.

Step 1: Go to the Pull Requests Section

Before you can approve a PR, you’ll need to locate it within the repository.

  1. Open your GitHub repository.
  2. At the top, click on the Pull requests tab.
  3. You’ll see a list of open pull requests.
  4. Click the title of the pull request you want to review.

Tip: Each PR displays the author, date, and a brief summary of what’s changed.

Step 2: Review the Code Changes

Once you open the PR, GitHub shows you an overview of all proposed changes.

  1. Under the Conversation tab, read the PR description — this usually explains what the change does.
  2. Switch to the Files changed tab to view actual code differences.
  3. Review each file carefully — look for bugs, syntax issues, or missing documentation.
  4. If you find something that needs improvement, click the + icon next to a line to add a comment.

Pro Tip: You can comment inline on specific lines or leave a general comment summarizing your review.

Step 3: Start a Review

After checking the code, you can either comment, approve, or request changes — but first, you’ll need to start a review session.

  1. On the Files changed tab, click the Review changes button (top-right corner).
  2. Choose one of the following options:
    • Comment – Leave feedback without approval or rejection.
    • Approve – Confirm that the changes look good and are ready to merge.
    • Request changes – Ask the contributor to make fixes before approval.
  3. Add an optional note summarizing your feedback.
  4. Click Submit review.

Tip: If multiple reviewers are assigned, GitHub shows each review’s status (Approved, Changes Requested, or Commented).

Step 4: Approve the Pull Request

If the code looks good and passes your checks, you can officially approve it.

  1. Open the Files changed or Conversation tab.
  2. Click the Review changes dropdown.
  3. Select Approve.
  4. Optionally, add a short message like “Looks great — ready to merge!”
  5. Click Submit review.

Pro Tip: Once approved, your name and approval status appear in the PR’s Reviewers section.

Step 5: Merge the Pull Request (If You Have Permission)

If you’re a repository admin or have write access, you can merge the PR directly after approval.

  1. On the PR page, click the Merge pull request button.
  2. Choose one of the following merge methods:
    • Create a merge commit (default, keeps full history).
    • Squash and merge (combines commits into one).
    • Rebase and merge (linear history).
  3. Click Confirm merge.

Once merged, the PR will close automatically, and the branch can be deleted.

Note: If you don’t have permission to merge, your approval still notifies the repository owner that the PR is ready.

Step 6: Approve Pull Requests from GitHub Desktop (Optional)

If you use GitHub Desktop, you can also review and approve PRs locally.

  1. Open GitHub Desktop.
  2. Go to File → Options → Accounts and make sure you’re signed in.
  3. From the menu, click Repository → Pull Requests.
  4. Select the PR you want to review.
  5. You can checkout the branch, test code changes locally, and then approve it via the GitHub web interface afterward.

Why this helps: Reviewing locally ensures that the code runs correctly on your machine before approval.

Step 7: Request Changes (If Needed)

If you find something that needs improvement before merging, you can request changes instead of approving.

  1. Click Review changes → Request changes.
  2. Add your comments (e.g., “Please fix indentation in line 42”).
  3. Click Submit review.

The author will be notified and can push new commits to the PR. Once updated, you can review and approve it again.

Wrapping Up

Approving a pull request on GitHub is an important step in maintaining clean, reliable code. It helps teams collaborate effectively and ensures that every change is reviewed before becoming part of the main branch.

By following the steps in this guide, you can review code, leave comments, approve pull requests, or request changes directly from GitHub’s web interface or via GitHub Desktop.

Whether you’re managing an open-source project or working in a team environment, learning how to approve pull requests properly is key to keeping your workflow smooth and professional.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.