git pull没有更新成功,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)

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):

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

git gc [--aggressive] [--auto] [--quiet] [--prune= | --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):

git-remote - manage set of tracked repositories

git remote prune [-n | --dry-run]

Deletes all stale remote-tracking branches under . These stale branches have already been

removed from the remote repository referenced by , but are still locally available in

"remotes/".

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值