Git gh006-protected-branch-update-failed GitHub refused the push because branch protection rules blocked updating the target ref.
Reviewed for reference consistency: August 11, 2026
Code is Safe
SECUREGit has paused the operation to protect your code. No data has been lost or corrupted.
What To Know
Where Did It Fail?
Commands That Trigger This
Technical Background
GH006 is GitHub-specific vocabulary inside the generic push-rejection family. Git itself only relays it: the client shows 'remote: GH006: ...' because the refusal was decided on the server, after the pack transfer, by the branch protection engine.
The rules live in the repository's settings, so the way forward is procedural rather than technical — route the change through a pull request, or have an administrator adjust the protection rules or the bypass list. No local Git flag changes the outcome.
Underlying Causes
Frequently Asked Questions
Protection rules attach to full ref names; the prefixed form (refs/heads/main) identifies exactly which ref the rules rejected.
Only if the protection rules grant an exception, such as inclusion in the bypass list; otherwise the same rejection applies to every account.
Related Git States
Git rejected your push because the remote repository contains commits missing from your local branch.
The remote server actively refused to accept your pushed commits due to server-side rules.
A push into a non-bare repository's active branch was denied by that repository's settings.