Carl Forgey
Carl Forgey

Reputation: 176

Unable to push to remote Git repo from Visual Studio 2022

TL;DR: When my new dev tries to push to our visualstudio.com git repo, they are getting the message: 'The reference 'refs/heads/master' cannot be updated because it is locked by Carl Forgey.)'.

I don't know how to "unlock" 'refs/heads/master' so that my new hire can push their changes to our repo. They were working off master branch, but that shouldn't matter, I don't think.

Upvotes: 0

Views: 37

Answers (1)

TTT
TTT

Reputation: 28849

In Azure DevOps, branches can be locked and unlocked in the branches view. Only the person who locked it, or someone with the permission to "Remove others' locks", can unlock it.

When a branch is "locked" it means no one can push to that branch except the person who locked it.

Tip: if a Pull Request attempts to auto-complete to a branch that is locked, the merge will fail and auto-complete will be turned off. Anytime you unlock a shared branch it may be a good idea to take a look at the active Pull Requests, filter by the target branch that was locked, and do a sanity check to make sure there aren't any PRs that should have been completed but weren't.

Upvotes: 0

Related Questions