繁体   English   中英

git fetch不断失败

[英]git fetch keeps failing

我在TFS女士上创建了一个分支,并尝试使用代码将其拉到本地计算机上:

git fetch

这是获取的结果:

error: cannot update the ref 'refs/remotes/origin/tryYourself/192RestService': unable to create directory for '.git/logs/refs/remotes/origin/tryYourself/192RestService': No such file or directory
From "url"
 ! [new branch]      tryYourself/192RestService -> origin/tryYourself/192RestService  (unable to update local ref)

然后,我在Google和StackOverflow上进行了搜索,然后他们告诉我这样做:

git gc --prune=now

并且:

git remote prune origin

然后我又做了一次:

git fetch 

因此,我可以在该分支上工作,但它会返回上面的结果/错误。

有人有什么建议吗?

  1. 确保运行git fetch的用户具有对本地存储库的写许可权。
  2. 请检查refs/remotes/origin/tryYourself/下是否有一个名为“ 192RestService”的文件
  3. 尝试删除文件“ 192RestService” ,然后再次检查gitfetch

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM