error: cannot lock ref ‘refs/remotes/origin/[branch]’ is *** but expect ****
#Update the reference first
git update-ref -d refs/remotes/origin/[locked branch name]
#Then synchronize the code git pull
Given two parameters, storing <newvalue> in <ref> may dereference the symbol reference. For example,
git update-ref HEAD <newvalue>update the current branch head to a new object.
Given three parameters, after verifying that the current value of <ref> matches <oldvalue>, store <newvalue> in <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 main 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 symbol pointer to another ref file by starting from the four-byte header sequence of “ref:”.
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 (ie, it will allow the file system to follow them, but will override such symbolic links to A normal file name elsewhere).
If –no-deref is given, the <ref> itself is overwritten instead of following the result of the symbol pointer.
- Git clone download code prompts that the file pointed to by head does not exist
- [Solved] Git review Error: Errors running git rebase -i remotes/gerrit/master
- Git Unable to switch remote branches error: pathspec ‘origin/XXXX’ did not match any file(s) known to git
- Git pull does not specify an error message for the branch
- [Solved] Git remote:error:refusing to update checked out branch:refs/heads/master”
- error: Cannot delete branch ‘xxx’ checked out at ‘xxxx’
- [Git]fatal: You are not currently on a branch.
- git:Pull is not possible because you have unmerged files [How to Solve]
- Runtime error: invalid memory address or nil pointer dereference [How to Solve]
- [How to Solve] fatal: No remote repository specified. Please, specify either a URL…