首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >git拉取失败"unable to resolve reference“"unable to update local ref”

git拉取失败"unable to resolve reference“"unable to update local ref”
EN

Stack Overflow用户
提问于 2010-06-08 23:34:41
回答 26查看 528.7K关注 0票数 736

使用git 1.6.4.2,当我尝试一个git pull时,我得到了这个错误:

代码语言:javascript
复制
error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory
From git+ssh://remoteserver/~/misk5
 ! [new branch]      LT558-optimize-sql -> origin/LT558-optimize-sql  (unable to update local ref)
error: unable to resolve reference refs/remotes/origin/split-css: No such file or directory
 ! [new branch]      split-css  -> origin/split-css  (unable to update local ref)

我试过git remote prune origin,但没有用。

EN

回答 26

Stack Overflow用户

发布于 2013-03-17 16:37:20

也发生在我身上。在我的例子中,糟糕的裁判是master,我做了以下操作:

代码语言:javascript
复制
rm .git/refs/remotes/origin/master
git fetch

这使得git恢复了ref文件。在那之后,一切都像预期的那样工作。

票数 734
EN

Stack Overflow用户

发布于 2011-10-01 02:18:43

这就完成了我的工作:

代码语言:javascript
复制
git gc --prune=now
票数 153
EN

Stack Overflow用户

发布于 2015-06-19 21:09:49

对我来说,它的工作是从文件夹.git/refs/remotes/origin/中删除抛出错误的文件。

票数 104
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2998832

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档