A pull request tells your team what code changes you want to merge
A pull request is a message to your repository that says: "I've made changes on my branch, and I'd like someone to review them before they go into the main code." It's not a command — it's a proposal. The person or people you ask to review can suggest changes, approve it, or ask you to fix something before merging.
The basic flow is: you push your branch to GitHub, you open a pull request from that branch into the branch you want to merge into (usually main), you add a title and description, and you request reviewers. Then you wait for feedback.
Key Takeaways
- You create a pull request on GitHub by going to your repository, clicking "Pull requests", and selecting "New pull request".
- Choose the branch with your changes as the source and the branch you want to merge into (usually main) as the target.
- Write a clear title and description so reviewers understand what the changes do and why you made them.
- Request specific reviewers or teams before you submit, so the right people see it immediately.
- You can make more commits to the same branch after opening the pull request, and they will automatically appear in the request.
Push your branch to GitHub first
Before you can create a pull request, your branch has to exist on GitHub, not just on your computer. If you've been working on a branch locally and haven't pushed it yet, open your terminal and run:
git push origin branch-name
Replace branch-name with the actual name of your branch. If this is the first time you're pushing this branch, Git will create it on GitHub automatically. If you're not sure what branch you're on, run git branch to see your local branches, or git status to see the current one.
Open a new pull request from the GitHub website
Go to your repository on GitHub in your web browser. Click the "Pull requests" tab near the top of the page. Then click the green "New pull request" button on the right side.
GitHub will show you two dropdown menus. The left one (with the arrow pointing left) is the base branch — the branch you want to merge your changes into. The right one is the compare branch — the branch with your changes. In most cases, you want to merge into main and compare against your feature branch. GitHub usually guesses correctly, but double-check before you continue.
Once you've selected the right branches, click "Create pull request".
Write a title and description that explain your changes
GitHub will open a form with two text fields. The first is the title — keep it short and specific. Instead of "Fix bugs" or "Update code", write something like "Add password validation to login form" or "Reduce database query time in user dashboard". A good title tells someone scanning a list of pull requests what the change does in one sentence.
The description field is where you explain why you made the change and what it does. You don't need to describe every line of code — reviewers can read the code itself. Instead, explain the problem you were solving, how your solution works at a high level, and anything a reviewer should know before reading the code (like "This changes the database schema" or "This requires a new environment variable"). If your change fixes an issue, you can reference it by typing # followed by the issue number, like #42.
If you're not ready for review yet, you can mark the pull request as a draft by clicking "Still in progress? Convert to draft" before you submit. Draft pull requests don't notify reviewers automatically, so use this if you want to push work-in-progress code and get feedback later.
Request reviewers and assign the pull request to yourself
On the right side of the pull request form, you'll see a "Reviewers" section. Click it and select the people or teams who should review your code. If you're not sure who to ask, check your repository's CODEOWNERS file — it lists who should review changes to different parts of the code. If there's no CODEOWNERS file, ask your team lead or check who usually reviews pull requests in your repository.
You can also assign the pull request to yourself in the "Assignees" section. This tells your team that you're the person responsible for the changes and for responding to feedback. Some teams use this differently — ask your team how they use assignments.
Submit the pull request and respond to feedback
Once you've filled in the title, description, and reviewers, click "Create pull request" at the bottom of the form. GitHub will send notifications to the people you requested, and your pull request will appear in the "Pull requests" tab of your repository.
Reviewers will comment on your code, ask questions, or request changes. You'll see their comments in the "Conversation" tab of the pull request. If they ask you to change something, make the changes on your local branch, commit them, and push to the same branch. The pull request will automatically update with your new commits — you don't need to create a new pull request.
Once all reviewers approve, someone with permission to merge (usually a team lead or maintainer) will click "Merge pull request" to combine your changes into the base branch. After that, you can delete your feature branch.
Common mistakes and how to avoid them
The most common mistake is opening a pull request with the wrong base branch. If you're working on a feature and you accidentally set the base to a different feature branch instead of main, your pull request will show changes from both branches. Before you click "Create pull request", always check that the base branch is what you expect.
Another mistake is writing a description that's too vague. "Fixed stuff" or "Made changes" doesn't help reviewers understand what they're looking at. Spend two minutes writing a real description — it saves reviewers time and makes your code easier to understand later when someone is reading the history.
If you push new commits after opening the pull request and they don't appear, check that you pushed to the right branch. Run git push origin branch-name again to make sure. The pull request will update within a few seconds.
Frequently Asked Questions
Can I create a pull request if I don't have permission to merge?
Yes. A pull request is a proposal, not an action. You can create one even if you don't have merge permission — that's actually the normal workflow. Someone else with merge permission will review it and decide whether to merge.
What if I need to make changes after I open the pull request?
Make the changes on your local branch, commit them, and push to the same branch. The pull request will automatically update with your new commits. You don't need to close and reopen it.
Can I create a pull request from a fork?
Yes. If you forked the repository, push your branch to your fork, then go to the original repository and click "New pull request". GitHub will let you compare your fork's branch against the original repository's branch.
What's the difference between a pull request and a merge?
A pull request is a request to review and discuss changes before they're merged. A merge is the actual action of combining the code. You create the pull request; someone else (or an automated system) performs the merge after approval.
Do I have to request reviewers, or can I just open a pull request?
You can open a pull request without requesting reviewers, but it's better to request them. Without a specific request, people might not notice your pull request. Requesting reviewers sends them a notification so they know to look at it.