A pull request (PR)is a way for developers to collaborate and propose changes in the codebase, doing so through the approval of another developer. This ensures that all changes are carefully reviewed and tested before being integrated into the codebase. You can think of a pull request as a peer review.
A pull request is like a chef preparing a meal and having their sous chef taste it before being served.
A chef will prepare ingredients and begin to cook a meal, starting with the basic foundation and slowly putting the entire meal together itself. The chef may first start off with working on the sauce. As they prepare the sauce, they will personally taste it as they make it to ensure they are on the right track. Once they think its in a good spot, they will then ask a sous chef or colleague to taste it, to ensure they get a second opinion before sending it out for a customer to eat.
If the sous chef has feedback, the chef will then be able to incorporate that feedback into their preparations, making alterations to the recipe to enhance the quality of the sauce. Once it is back to a place where the chef is confident with it, they will have the sous chef taste it again. When the sous chef gives the thumbs up, they will then use it as the final product for the meal.
A pull request is a way for developers to collaborate on a codebase, ensuring that they review each other's work to only integrate code that is of quality and mutually agreed upon. Common code repositories like GitHub, GitLab, and Bitbucket leverage pull requests.
It's one thing to know what a PR is, but that is worthless if you don't know why you should know what a pull request is in the first place. Let's break down the importance of this tech term based on two high level categories. We'll walk through an explanation as well as provide a score, 1-10, that shows you how much you should care about a pull request.
The first will be if you do not have a product yet. This means that you don't have a physical product. Maybe you're in the ideation phase, or maybe you're almost ready to start development. Whichever it is, we'll get into why a pull request is important and why you should or shouldn't care about it if you do not have a product.
If you don't have a product yet, you should not worry too much about what a pull request is, unless you are in the process of building your product. If you're pre-product though, don't worry about the proper developer habits that should be followed as you should be focusing on customer discovery and problem validation.
The second category is if you do have a live product. Maybe you just launched your business or maybe it's been live for years and you're continuing to improve its quality. Regardless of the scenario, if your product is live, a PR carries a different weight.
If you do have a product, you absolutely should know what a pull request is and ensure that your development team is leveraging them. A pull request is your quickest way to mitigate development fires down the line, so it is critical that your team values pull requests and incorporates them into your development process.
So you know what a pull request is, by definition. You know if you should care about it or not depending on your situation as a business/company/product. To dig in deeper, we will walk through some tools and processes so we can make sure you really have a solid grasp on a pull request.
Let's walk through three different examples where a developer may leverage a pull request: