Pull Requests

What

A Pull Request (PR) is a collaborative mechanism used on hosting platforms like GitHub to propose incorporating changes from one branch into another (typically merging a feature branch into the stable main branch).

How

Although branches are technically merged using the Git CLI, teams manage the review process through the GitHub web interface:

  1. Push: Upload your local feature branch to GitHub:
    git push origin add_classics
  2. Propose: Navigate to the repository page on GitHub and open a “New Pull Request.”
  3. Review: Compare the modifications, leave descriptive comments, ask for review, and let team members inspect and discuss the proposed lines of code.
  4. Merge: Once approved, click the “Merge Pull Request” button on the GitHub interface to officially commit the code to the base branch.

Why

If multiple developers pushed modifications directly to main without review, unstable or conflicting changes would break the build constantly. Pull Requests isolate features, creating a dedicated space for code review, quality testing, and team feedback. This guarantees that only stable, approved code is ever integrated into the production-ready base branch.

Summary

Pull Requests (PRs) act as dedicated review spaces on GitHub where developers discuss, review, and approve proposed branch changes before merging them into production code.