使用git 1.6.4.2,当我尝试一个git pull
时,我得到了这个错误:
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
,但没有用。
发布于 2013-03-17 16:37:20
也发生在我身上。在我的例子中,糟糕的裁判是master,我做了以下操作:
rm .git/refs/remotes/origin/master
git fetch
这使得git恢复了ref文件。在那之后,一切都像预期的那样工作。
发布于 2011-10-01 02:18:43
这就完成了我的工作:
git gc --prune=now
发布于 2015-06-19 21:09:49
对我来说,它的工作是从文件夹.git/refs/remotes/origin/
中删除抛出错误的文件。
https://stackoverflow.com/questions/2998832
复制相似问题