What is a Pull Request?

Berra Sarı
3 min readJun 14, 2023

A pull request is an event in which a developer sends a proposed change to a repository or branch on GitHub. It allows contributors to suggest changes to a project, and serves as a way to communicate between users. It is the most common way to collaborate on GitHub.

How to Create a Pull Request

A pull request is created by creating a fork of a repository, making changes to the code in the fork, and then submitting a pull request. The GitHub documentation provides the following steps to create a pull request:

  1. Go to the repository that you want to contribute to.
  2. Go to the “Pull Requests” tab on the left sidebar.
  3. Click on the “New Pull Request” button.
  4. Enter a title and description for the changes you want to make.
  5. Choose the “Base” branch — usually the master branch of the repository — and the “Head” branch, which should be the branch containing your changes.
  6. Click “Create Pull Request”.

Once you create a pull request, other users can comment on it and review the changes you’ve made. If your changes are accepted, they can be merged into the main branch.

Benefits of Pull Requests

Pull requests have become increasingly popular on GitHub, as they offer several advantages to the developer and the project:

  • Items can be discussed: Pull requests allow users to discuss the proposed changes before they are merged into the master branch. This way, users can have a discussion about the proposed changes and reach a consensus.
  • Improves code quality: Pull requests allow users to review the code and suggest improvements to it before the changes are applied to the master branch. This way, the code quality is improved before it is released.
  • Higher collaboration: Pull requests foster collaboration between users, as they give users the opportunity to work together on a project.

FAQ

What is a pull request?

A pull request is an event in which a developer sends a proposed change to a repository or branch on GitHub. It allows contributors to suggest changes to a project, and serves as a way to communicate between users. It is the most common way to collaborate on GitHub.

What are the steps to create a pull request?

  1. Go to the repository that you want to contribute to.
  2. Go to the “Pull Requests” tab on the left sidebar.
  3. Click on the “New Pull Request” button.
  4. Enter a title and description for the changes you want to make.
  5. Choose the “Base” branch — usually the master branch of the repository — and the “Head” branch, which should be the branch containing your changes.
  6. Click “Create Pull Request”.

What are the benefits of pull requests?

Pull requests have several advantages to the developer and the project:

  • Items can be discussed: Pull requests allow users to discuss the proposed changes before they are merged into the master branch.
  • Improves code quality: Pull requests allow users to review the code and suggest improvements to it before the changes are applied to the master branch.
  • Higher collaboration: Pull requests foster collaboration between users, as they give users the opportunity to work together on a project.

How do I find pull requests?

Pull requests can be found by navigating to the repository they belong to and going to the “Pull Requests” tab on the left sidebar. From there, you can browse and view existing pull requests.

How do I review a pull request?

To review a pull request, click on the link for the pull request on the “Pull Requests” tab. From there, you can view the changes made to the code and comment on the pull request.

Sources

--

--

No responses yet