Problem
When attempting a git fetch operation within the IDE, the operation fails with a lock file error message, even though no such lock file exists, and the same operation works seamlessly in the terminal. Also, no other git processes are running.
Error observed:
could not delete references: cannot lock ref 'refs/remotes/origin/…':
Unable to create '/Users/a.kalinin/webdev/autodoc/shop/.git/refs/remotes/origin/….lock': File exists.
Another git process seems to be running in this repository...
Resolution
The issue is resolved by manually updating the references that seem to cause the error. Execute the following command for each problematic branch:
git update-ref -d refs/remotes/origin/<bad_branch>
Replace <bad_branch> with the appropriate branch name in your repository where the issue is encountered.
Comments
0 comments
Please sign in to leave a comment.