Fix fatal: Couldn't find remote ref refs/heads/xxx [core] fatal: The remote end hung up unexpectedly

来源:互联网 发布:剑三动漫捏脸数据 编辑:程序博客网 时间:2024/06/05 04:14

造成原因

  • 本地 git 分支出现异常

解决方案

  • 切换到仓库根目录

  • $ vim .git/config (备注:红色git小写)

  • 找到其中的一条内容 [remote "origin"] 修改其中的fetch为:fetch = +refs/heads/*:refs/remotes/origin/*

  • 再次尝试 $git pull 拉取最新的代码之后,成功!

参考

  • https://stackoverflow.com/questions/6930147/git-pull-displays-fatal-couldnt-find-remote-ref-refs-heads-xxxx-and-hangs-up
阅读全文
0 0
原创粉丝点击