error: cannot lock ref ‘refs/remotes/origin/[branch]’ is *** but expect ****
git update-ref -d refs/remotes/origin/[locked branch name]
Then synchronize the code git pull
Given two parameters, storing
<ref> may dereference symbol references. For example,
git update-ref HEAD <newvalue> will update the current branch head to a new object.
Given three parameters, after verifying that the current value of
<ref>, which may dereference the symbol reference. For example,
git update-ref refs/heads/master <newvalue> <oldvalue>, only when its current value is
<oldvalue>, will the master branch head be updated to
<newvalue>. You can specify 40 "0" or an empty string as
<oldvalue> to ensure that the reference you create does not exist.
It also allows the
ref file to become a symbolic pointer to another
ref file by starting from the four-byte header sequence of
More importantly, it allows updates of
ref files to follow these symbol pointers, whether they are symbolic links or these "regular file symbol references". It only follows true symbolic links when it starts with
refs/: otherwise it will only try to read them and update them to regular files (i.e. it will allow the file system to follow them, but will override such symbolic links to A common file name in other locations).
--no-deref is given, then
<ref> itself is overwritten instead of following the result of symbolic pointers.