使用git pull拉取代码的时候,无法拉取最新代码,报"unable to update local ref"错误。

除了重新clone一份代码外,还可以使用如下解决方案:

1、切换到之前clone代码目录下,执行命令git gc --prune=now

2、再执行命令git remote prune origin

3、再次使用git pull

转载于:https://www.cnblogs.com/JimmyBright/p/10635159.html

git pull报“unable to update local ref”解决方案相关推荐

  1. 2021-07-12Git - git pull时遇到error: cannot lock ref ‘refs/remotes/origin/master‘: unable to resolve...

    git pull时遇到问题及解决方法 问题描述: 解决方法及原因分析: 1.git log 错误: 解决方法:修复 .git/refs/heads/分支名 原因分析:IDE的错误关闭 2.git pu ...

  2. 2021-08-03 git pull 报错 cannot lock ref

    git pull 报错:error: cannot lock ref 'refs/remotes/origin/release/xxx': 'refs/remotes/origin/release' ...

  3. git第一次提交代码到码云,git pull 报错:fatal: refusing to merge unrelated histories

    第一次提交的步骤: 1.进入项目目录,执行 git init 2.连接远程仓库 git remote add origin 远程仓库地址(从码云乎哟这github上复制地址即可) 3.报错:git p ...

  4. 电脑重装系统之后git pull报错 Permission denied (publickey)

    今天我重装了系统,之后使用git pull报如下的错误消息: git@github.xxx.corp: Permission denied (publickey). fatal: Could not ...

  5. git pull报错Pulling is not possible because you have unmerged files

    git pull 报错 error: Pulling is not possible because you have unmerged files. 解决办法 1. git add -u 2. gi ...

  6. git pull报错unexpected disconnect while reading sideband packet

    git pull报错unexpected disconnect while reading sideband packet 解决方法 修改http请求最大容量:git config http.post ...

  7. git pull报没有足够内存 not enough memory for initialization

    git clone 或 git pull 批量同步远程 git仓库代码时,报 没有足够内存用于初始化 not enough memory for initialization.经过观察 资源管理器 的 ...

  8. git pull 报错 error: cannot pull with rebase: Your index contains uncommitted changes.

    git pull 报错 error: cannot pull with rebase: Your index contains uncommitted changes. error: please c ...

  9. IDEA Maven 报 Unable to import maven project解决方案

    IDEA Maven 报 Unable to import maven project解决方案 问题: 解决: 问题: 将同事给的项目放在自己电脑IDEA里,加载时一直报Unable to impor ...

最新文章

  1. Neo4j Java Rest绑定入门(Heroku部署)
  2. spark on yarn 完全分布式_「大数据」(七十一)Spark之架构介绍
  3. 编译安装Apache、php、xcache、FastCGI及相关整合
  4. 土豆首页图片延迟加载的效果
  5. flask ai 简单语音对话
  6. 连接服务器切换无线,怎么用路由器连接别人的wifi?
  7. 大势至USB端口管理软件网络版8.1注册破解
  8. [Usaco2010 Dec]Treasure Chest 藏宝箱
  9. 多目标多角度的快速模板匹配算法(基于NCC,效果无限接近Halcon中........)
  10. 通过top查看程序cpu使用率为什么会超过100%
  11. 利用HomeKit、智汀家庭云,让不同生态智能家居实现互联互通
  12. 《基于Cortex-M4的虚拟机制作与测试》课程设计 结题报告
  13. 大学物理上册详细笔记_大学物理上册课堂笔记.pdf
  14. 《响应式Web设计实践》一1.2 设备来了,设备来了
  15. Android 的媒体路由功能应用与框架解析 MediaRouter
  16. 解决html5直播延迟大问题,SRS 直播系统使用中发现延迟过大
  17. hostapd对WIFI 热点(AP)的配置方法
  18. gradle版本与android的gradle插件版本兼容Unable to find method org.gradle.api.tasks.compile.CompileOptions.setB
  19. JSONArray转字符串数组
  20. 惊魂一小时:全国域名解析首遭大规模污染

热门文章

  1. 【GAN优化】GAN优化专栏上线,首谈生成模型与GAN基础
  2. 【AI不惑境】残差网络的前世今生与原理
  3. 【直播预告】计算机视觉中数据增强原理和实践
  4. 栈(stack)和堆(heap)
  5. [JZOJ5281]钦点题解--瞎搞+链表
  6. 让设计模式在开始就拯救你的项目
  7. 这周开发工作时间及内容、思考和阅读的内容
  8. API(Application Programming Interface,应用程序编程接口)
  9. 静态页中调用动态数据的三种办法
  10. UVA 10803 Thunder Mountain