git fetch不断失败 [英] git fetch keeps failing

查看:146
本文介绍了git fetch不断失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I created a branch on Ms TFS and I tried to pull it on to my local machine with the code:

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上进行了搜索,然后他们告诉我要做:

Then I searched it on Google and StackOverflow, and they told me to do:

git gc --prune=now

而且:

git remote prune origin

然后我又做了一次:

git fetch 

所以我可以在那个分支上工作,但是会返回结果/错误如上。

So I can work on that branch but it gives back the result/error as above.

有人建议吗?

推荐答案


  1. 确保运行 git fetch 的用户具有对本地存储库
    的写入权限。

  2. 请检查是否
    refs / remotes / origin / tryYourself /

  3. <下有一个名为 192RestService 的文件li>尝试删除文件 192RestService ,然后再次检查 gitfetch
  1. Make sure the user run the git fetch has the write permission to your local repository.
  2. Please check if there is a file called "192RestService" under refs/remotes/origin/tryYourself/
  3. Try to remove the file "192RestService", then check the gitfetch again.

这篇关于git fetch不断失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆