Git refusing-to-update-checked-out-branch A push into a non-bare repository's active branch was denied by that repository's settings.
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
The protection exists because pushed commits would exist only in the object database. The checked-out files and index would still describe the old commit, and the divergence would stay invisible until someone inspected the server directory.
The remote controls the outcome: bare repositories have no current branch and accept such pushes without comment, while non-bare ones can set receive.denyCurrentBranch to updateInstead to apply incoming changes to the work tree, or to warn and ignore knowingly. The client cannot override any of this.
Underlying Causes
Frequently Asked Questions
A bare repository has no index or working tree to drift out of sync, so there is nothing for the guard to protect.
updateInstead updates the checked-out files to match the pushed commit when the work tree is clean, while ignore accepts the push and leaves the work tree stale.
Related Git States
Git rejected your push because the remote repository contains commits missing from your local branch.
Git rejected your push because your branch is behind the remote, preventing a linear update.
The remote server actively refused to accept your pushed commits due to server-side rules.
GitHub refused the push because branch protection rules blocked updating the target ref.