git pull失败“无法解析引用” “无法更新本地参考” [英] git pull fails "unable to resolve reference" "unable to update local ref"

查看:1204
本文介绍了git pull失败“无法解析引用” “无法更新本地参考”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用git 1.6.4.2,当我做一个 git pull 时,我得到这个错误:

Using git 1.6.4.2, when I do a git pull I get this error:

error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory
From git+ssh://remoteserver/~/misk5
 ! [new branch]      LT558-optimize-sql -> origin/LT558-optimize-sql  (unable to update local ref)
error: unable to resolve reference refs/remotes/origin/split-css: No such file or directory
 ! [new branch]      split-css  -> origin/split-css  (unable to update local ref)

我试过git remote prune origin ,但它没有帮助。

I've tried git remote prune origin, but it didn't help.

推荐答案

尝试清理你的本地存储库:

Try cleaning-up your local repository with:

$ git gc --prune=now
$ git remote prune origin






man git-gc(1):


man git-gc(1):

git-gc - Cleanup unnecessary files and optimize the local repository

git gc [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune]

       Runs a number of housekeeping tasks within the current repository, such as compressing file revisions
       (to reduce disk space and increase performance) and removing unreachable objects which may have been
       created from prior invocations of git add.

       Users are encouraged to run this task on a regular basis within each repository to maintain good disk
       space utilization and good operating performance.

man git-remote(1):

man git-remote(1):

git-remote - manage set of tracked repositories

git remote prune [-n | --dry-run] <name>

           Deletes all stale remote-tracking branches under <name>. These stale branches have already been
           removed from the remote repository referenced by <name>, but are still locally available in
           "remotes/<name>".            

这篇关于git pull失败“无法解析引用” “无法更新本地参考”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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