When GitHub says merging is blocked, the base branch has a protection rule or ruleset your pull request doesn’t meet yet. Usually it’s a missing approval or a required check that hasn’t passed. The rest of the time it’s an unresolved conversation, an unsigned commit, a merge commit on a branch that wants linear history, or a deployment that hasn’t succeeded.
Why is merging blocked on my GitHub pull request?
Protected branches and rulesets both apply to the same branch, and GitHub enforces all of them. When the same rule is set in two places, the stricter version wins. That’s why a branch that looks lightly protected under Settings, then Branches, can still block: a ruleset asks for more. Anyone with read access can add /rules to the repository URL to see the active rulesets.
Required reviews
Required reviews count approvals from people with write permissions, or from a designated code owner. These four trip people up most:
- Changes requested. A review that requests changes blocks the merge until its author approves. If that reviewer is away, anyone with write permissions can dismiss it.
- Stale approvals. With Dismiss stale pull request approvals when new commits are pushed on, a push or an Update branch click that changes the diff removes earlier approvals. Ask for a fresh one.
- Code owners. With Require review from Code Owners, a code owner of each touched path must approve. See our guide to code owner review required.
- Last pusher. Require approval of the most recent reviewable push means someone other than the last pusher must approve after that push, as covered in approval from someone other than the last pusher.
A rarer one: GitHub won’t merge a fully approved pull request if another open pull request’s head branch points at the same commit and has a pending or rejected review. Approve or dismiss that review first.
Required status checks
Required checks have to finish as success, skipped, or neutral on the latest commit. Checks from earlier commits don’t count. A check stuck on “Waiting for status to be reported” usually means its workflow never ran, often because a path filter skipped it. Our post on expected, waiting for status to be reported explains the fix. If the rule is strict (Require branches to be up to date before merging is checked), you also have to merge or rebase the base branch into yours.
A required check can also be pinned to one GitHub App. If something else sets it, you see “Required status check ‘build’ was not set by the expected GitHub App”, and GitHub’s troubleshooting page says to check which app set it in the merge box.
Unresolved conversations
Require conversation resolution before merging needs every thread on the pull request resolved. Go through the Conversation tab and resolve each one that’s been addressed. If a thread still needs an answer, answer it before you resolve it.
Unsigned commits
With Require signed commits, GitHub builds a test merge and checks every commit it introduces, head branch included, so unsigned commits block even a squash merge that GitHub would sign itself. Rewrite and sign the commits on the head branch, then force push:
git rebase --exec 'git commit --amend --no-edit -S' main
git push --force-with-leaseOr ask someone who can bypass the rule to merge it for you.
Require linear history
Linear history forbids merge commits on the branch, so pick Squash and merge or Rebase and merge from the merge button. The repository has to allow one of those for the rule to be on at all.
Deployments, merge queues and locked branches
Require deployments to succeed before merging names environments, such as staging, that have to deploy the change first. Get that deployment green and the block lifts. With Require merge queue, you add the pull request to the queue instead of merging it, and GitHub merges it after the required checks pass against the latest target branch. Workflows behind those checks need the merge_group trigger, or the check is never reported.
Lock branch makes the branch read-only, and Restrict who can push to matching branches lets only the listed users, teams, or apps push. Either one stops you outright.
Push rejected with GH006: Protected branch update failed
The same rules apply when you push straight to the protected branch. Git prints remote: error: GH006: Protected branch update failed for refs/heads/main. and a line naming the rule, such as Changes have been requested. or Required status check "ci-build" is failing. Push to a new branch and open a pull request instead. If the error says GH013, a ruleset rejected the push, and our GH013 repository rule violations guide covers each rule line.
I review in Pyor, which keeps the merge box in an inspector next to the conversation, so it stays in view while I read.
Frequently asked questions
Why is merging blocked when the pull request is approved?
Approval covers only one rule. Status checks, conversation resolution, signed commits, linear history and deployments are separate requirements, and a ruleset can add more. Also, another open pull request whose head branch points at the same commit with a pending or rejected review blocks yours until someone approves or dismisses that review.
Can an admin merge a blocked pull request?
By default, branch protection rules do not apply to people with admin permissions or a custom role with the "bypass branch protections" permission. If the rule has "Do not allow bypassing the above settings" turned on, admins are held to it too. Rulesets have their own bypass list.
Where do I see which rules apply to my branch?
Branch protection lives under Settings, then Branches. For rulesets, anyone with read access can add /rules to the repository URL. Rulesets and branch protection rules stack, and the most restrictive version of each rule wins.