git cannot lock ref

如果在 git 准备下载仓库的时候,出现下面的错误

cannot lock ref ‘refs/remotes/origin/xx’:’refs/remotes/origin/xx/xx’ exists cannot create ‘ref/remotes/origin/xx’

那么请看本文,本文提供了一个解决方法。

请使用下面代码

git update-ref -d refs/remotes 
git fetch

使用了之后就可以了。

https://stackoverflow.com/questions/43533473/error-cannot-lock-ref-refs-tags-exists-cannot-create-refs-tags

因为现在的 csdn 不能修改博客时间,所以我会更新博客在搭建的网站,请访问 https://lindexi.gitee.io/lindexi/post/git-cannot-lock-ref.html

知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接:http://blog.csdn.net/lindexi_gd ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系

原文地址:https://www.cnblogs.com/lindexi/p/12087258.html