How to create a pull request on GitHub
On GitHub (verified 2026-10-24), push your feature branch, open the repository, click Compare & pull request (or Pull requests > New pull request), choose base and compare branches, write a clear title/description, request reviewers, then create the PR. After review and status checks, Merge pull request (merge commit, squash or rebase per repo rules).
Pull requests propose merging one branch into another — they are not Issues (though you can link them). Fork workflows compare across forks; same-repo teams usually branch from main/master.
Applies to github.com repositories you can push to (or forks). Branch protection may require reviews/CI before merge. GitHub CLI (gh pr create) is an alternative once authenticated.
Open, review, and merge a PR
Push your branch
- Create a branch locally and commit your changes.
- Push the branch to GitHub (
git push -u origin branch-name). - Open the repository on github.com.
Create the pull request
- Click the banner Compare & pull request, or Pull requests > New pull request.
- Set base (target) and compare (your) branches.
- Fill title/body, link issues, request reviewers > Create pull request.
Finish the review
- Address review comments with new commits on the same branch.
- Wait for required checks if branch protection is on.
- Merge when approved, then delete the branch if your team does.
Our take: small PRs review faster
A 200-line focused PR beats a week-long mega-branch — reviewers catch bugs when the diff is scannable.
If it fails
- Compare & pull request missing: push did not reach the remote, or you lack permission.
- Merge blocked: failing checks or missing reviews — open the Checks / Conversation tabs.
- Wrong base branch: edit the PR’s base if the repo allows, or recreate.
- Fork PR: ensure you compare fork:branch → upstream:base.
Frequently asked questions
What is a GitHub pull request?
A proposal to merge a branch’s commits into another branch with discussion, review and CI checks.
How do I open a PR?
Push your branch > Compare & pull request (or New pull request) > set base/compare > Create pull request.
PR vs Issue?
Issues track problems/tasks; pull requests deliver code changes to merge.
Squash vs merge commit?
Squash folds commits into one on the base; merge commit preserves history — follow your repo’s default.
Can I create a draft PR?
Yes — choose Create draft pull request when you want early visibility without formal review.