GitHub Pull Request Step by Step Guide for Beginners

Logan Jul 13, 2026

Collaboration is a cornerstone of software development, and GitHub's pull requests play a pivotal role in this process. They provide a way for developers to discuss, review, and refine code before it's integrated into a project. Let's dive into the step-by-step process of a pull request on GitHub.

Incredible Pull Request Template Open Source Project
Incredible Pull Request Template Open Source Project

First, ensure you have a GitHub account and the Git software installed on your local machine. You'll need to clone or fork the repository you want to contribute to. Once you've made your changes locally, it's time to push them to your fork and create a pull request.

Learn How to Contribute to Open Source
Learn How to Contribute to Open Source

Preparing Your Changes

Before creating a pull request, make sure your changes are well-organized and pushed to your fork.

a diagram that shows the flow of people in a network, and how to use it
a diagram that shows the flow of people in a network, and how to use it

Start by ensuring your working directory is clean. Stash any changes if necessary, then pull the latest from the upstream master branch to ensure your changes are on top of the latest code:

Stashing Changes

GitHub Complete Beginner Guide (2026) | Learn Git & GitHub Step-by-Step
GitHub Complete Beginner Guide (2026) | Learn Git & GitHub Step-by-Step

If you have any changes you're not ready to push, you can stash them using:

git stash save "Message describing your changes"

Updating Your Fork

GitHub API: How to retrieve the combined pull request status from commit statuses, check runs, and GitHub Action results
GitHub API: How to retrieve the combined pull request status from commit statuses, check runs, and GitHub Action results

Keep your fork up-to-date with the original repository by merging the changes from the master branch:

git checkout master
git pull origin master
git push origin master

Creating a Pull Request

two screenshots with the same text on them, one showing an email message and the other saying'this is looking i've got a few comments that should be
two screenshots with the same text on them, one showing an email message and the other saying'this is looking i've got a few comments that should be

Now that your changes are ready, it's time to create a pull request.

First, push your changes to your fork:

GitHub Roadmap for Beginners 2025: Learn Git, Repositories & Open Source πŸš€
GitHub Roadmap for Beginners 2025: Learn Git, Repositories & Open Source πŸš€
How to Add Screenshots and Animation to GitHub Pull Requests - Make Tech Easier
How to Add Screenshots and Animation to GitHub Pull Requests - Make Tech Easier
πŸ”€ Merge Operation Using GitHub
πŸ”€ Merge Operation Using GitHub
GitHub for Beginners πŸ§‘β€πŸ’» What You Must Know (2026 Guide)
GitHub for Beginners πŸ§‘β€πŸ’» What You Must Know (2026 Guide)
Your First Open Source Contribution: A Beginner's GitHub Guide πŸŒ±πŸ’»
Your First Open Source Contribution: A Beginner's GitHub Guide πŸŒ±πŸ’»
Git & GitHub Mastery Series for Beginners πŸš€
Git & GitHub Mastery Series for Beginners πŸš€
How to Send a Pull Request using the Github Desktop Client - iDevie
How to Send a Pull Request using the Github Desktop Client - iDevie
πŸš€ How to Upload a Local Repository to GitHub with git push
πŸš€ How to Upload a Local Repository to GitHub with git push
GitHub - dec0dOS/amazing-github-template: πŸš€ Useful README.md, LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, GitHub Issues, Pull Requests and Actions templates to jumpstart your projects.
GitHub - dec0dOS/amazing-github-template: πŸš€ Useful README.md, LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, GitHub Issues, Pull Requests and Actions templates to jumpstart your projects.
What is Git & GitHub? A Complete Guide for Beginners πŸ‘¨β€πŸ’»
What is Git & GitHub? A Complete Guide for Beginners πŸ‘¨β€πŸ’»
How to Sync Forked Repositories Using Git or Github
How to Sync Forked Repositories Using Git or Github
#git #github #versioncontrol #interviewpreparation #softwaredevelopment #devops #learningjourney #sdet #qatesting | Satya Tharun Manikanta Nalle
#git #github #versioncontrol #interviewpreparation #softwaredevelopment #devops #learningjourney #sdet #qatesting | Satya Tharun Manikanta Nalle
the ultimate guide to creating an in - app for your website
the ultimate guide to creating an in - app for your website
How I changed the law with a GitHub pull request
How I changed the law with a GitHub pull request
How to Set Up a Basic CI/CD Pipeline with GitHub Actions
How to Set Up a Basic CI/CD Pipeline with GitHub Actions
Introducing draft pull requests
Introducing draft pull requests
How to Open a Pull Request on GitHub
How to Open a Pull Request on GitHub
GitHub for Beginners: The Ultimate Guide to Repositories and Branches
GitHub for Beginners: The Ultimate Guide to Repositories and Branches
Step-by-step team workflow with GitHub Desktop
Step-by-step team workflow with GitHub Desktop
Beginner’s Guide to Getting Started with GitHub in 2025 – Easy Step-by-Step Tutorial
Beginner’s Guide to Getting Started with GitHub in 2025 – Easy Step-by-Step Tutorial

Pushing Changes to Your Fork

Push your changes to your fork using:

git push origin your-branch-name

Creating the Pull Request

Once your changes are pushed, navigate to the repository page on GitHub. Click on the 'Pull requests' tab, then click on the green 'New pull request' button. You'll see a comparison of your branch against the target branch (usually 'main' or 'master').

Describe your changes in the 'Title' and 'Description' fields, then click on 'Create pull request'. Your pull request is now live and ready for review.

Addressing Review Feedback

Respond to any feedback or requested changes by making additional commits to your branch. You can push these changes directly to your branch without needing to create a new pull request.

Once you've addressed all feedback, anyone with write permissions can merge your pull request into the target branch.

Merging the Pull Request

When your changes are merged, GitHub will create a new merge commit in the target branch. Alternatively, if you prefer, you can squash and merge your changes using the 'Create a merge commit' button.

Deleting the Branch

After the merge, delete your branch to keep things tidy. You can do this from your fork's repository page or by running:

git branch -d your-branch-name
git push origin --delete your-branch-name

With your pull request merged, your code is now part of the main project. Congratulations! Next, consider contributing to more projects or improving yours further. Happy coding!