Cheatsheet - Pull Requests
What is a Pull Request?
A pull request (PR) is basically a request to merge code from one branch into another branch (usually into
mainordevelop).
*You take changes from one branch and combine them into another*Think of it as:
“Hey team, I finished a piece of work on my branch. Please review it before we add it to the main project.”
A typical Pull Request looks like..
- You create a branch for a feature (or bugfix)
- You push your changes to GitHub
- You open a PR from your branch → into
main - Reviewers check your code (comment, suggest changes, approve)
- When approved, it gets merged into the main codebase
This ensures that our main branch stays stable!
Tools such as GitHub Projects, together with issues and user stories, provide structure and improve communication, leading to a more efficient and higher-quality workflow.
Why it’s useful
A Pull Request (PR) is really just a formal proposal:
“I’d like to merge my branch into
main. Here are the changes. Please review.”
- Keeps
mainstable (only reviewed code gets in). - Allows discussion before merging.
- Keeps a history of why and how changes were made.
- Connects to Issues/Project boards so work is traceable.
Draft Pull Requests
Sometimes your code isn’t ready to merge yet, but you still want feedback.
That’s when you can open a Draft Pull Request:
- Shows clearly that the work is still in progress.
- The green “Merge” button is disabled until you mark it Ready for review.
- Useful for early feedback, team visibility, and testing.
Open a pull request and pick what best suits you
Step by Step - Guide
Prerequisites
- A Github Account
- A Github Repository
- Basic Git Knowledge
- A local Project that is initialized with
$ git init
#1 Preparing the problem
- Create a new branch with
$ git branch new-branch-name-here - Add faulty code to the project
$ git add .$ git commit -m "Initial Commit"$ git push
With the bad code pushed to the branch, we'll now perform the Fix!
Here's the example of my code
IMG #1 - Service Logic
IMG #2 - Controller Endpoint w/o Validation
#2 Performing a Pull Request
-
Navigate to your Github Repository
-
Within the
Mainbranch there's aCompare & Pull Requestfor your information!
-
In this example we'll go with an ordinary Pull Request
-
Fill in the Description, click
Create pull request
-
Review, discuss and comment
In this example, i'm adding a simple comment to play pretend in a group setting where we would want to add constructive feedback and suggest changes -
Add a reply to the comment
-
Post and Publish, now merge
Now what?
YOU MADE IT!
Make sure you try this out a couple of times and familiarize yourself with other tools such as collaborating with Pull Requests and Issues!
For example, say you open up an issue #12, you could in a git commit message link to an issue using $ git commit -m "Fix: Security Issues in Validation (#12) ".
Pull Request - Documentation
Read more about Pull Requests at Github's official documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
Finished
Back to Overview: Developer Fundamentals










