git无法提取远程更改 [英] git unable to pull remote changes

查看:85
本文介绍了git无法提取远程更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于以下错误,我无法从远程存储库中提取更改.我正在尝试从此存储库的master分支中提取.

I am unable to pull changes from the remote repository due to the following error. I am trying to pull from the master branch of this repository.

c:\supportal>git pull
error: cannot lock ref 'refs/remotes/origin/KANBAN': unable to resolve 
reference refs/remotes/origin/KANBAN: Invalid argument
From https://github.cerner.com/ApplicationServices/supportal
! [new branch]      KANBAN     -> origin/KANBAN  (unable to update local 
ref)
error: cannot lock ref 'refs/remotes/origin/kanban': unable to resolve 
reference refs/remotes/origin/kanban: Invalid argument
! [new branch]      kanban     -> origin/kanban  (unable to update local 
ref)

远程存储库KANBAN是一个我不再使用的旧工作目录.不确定如何解决此问题.

The remote repository KANBAN was an old working directory that I am not using anymore. Not sure how to fix this.

我尝试了以下操作,但无效:git remote prune起源

I tried the following, which did not work: git remote prune origin

$ git gc --prune=now
error: bad ref for refs/remotes/origin/kanban
fatal: bad object refs/remotes/origin/kanban
error: failed to run repack

我还删除了远程原始引用并重新添加了它,然后运行了git pull,但这并不能解决..

I also removed the remote origin reference and re-added it, then ran a git pull but that did not fix it as well..

推荐答案

不确定在这里发生了什么.但是我自己通过在repo_location/.git/refs/remote中删除了一个名为kanban的文件,然后运行来解决了这个问题.一个'git pull'命令.

Not sure what happened here.. But I was able to fix this myself by deleting ta file called kanban in repo_location/.git/refs/remote and then running a 'git pull' command.

这篇关于git无法提取远程更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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