如何处理git gc fatal:坏对象refs / remotes / origin / HEAD错误:无法运行重新包装 [英] How to handle git gc fatal: bad object refs/remotes/origin/HEAD error: failed to run repack

查看:4162
本文介绍了如何处理git gc fatal:坏对象refs / remotes / origin / HEAD错误:无法运行重新包装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $ git gc 
致命错误:bad object refs / remotes / origin / HEAD
错误:无法运行重新包装

我该如何处理这是什么?

解决方案

我不明白这一点的影响,但正如 in this thread ,当我遇到这个时,我只是做了

$ mv .git / refs / remotes / origin / HEAD / tmp

(以防万一)然后

$ git gc

无怨无悔地工作;我没有遇到任何问题。


I randomly hit list today while trying to garbage collect.

$ git gc
fatal: bad object refs/remotes/origin/HEAD
error: failed to run repack

How do I deal with this?

解决方案

I don't understand the ramifications of this, but as suggested in this thread, when I encountered this I just did $ mv .git/refs/remotes/origin/HEAD /tmp (keeping it around just in case) and then $ git gc worked without complaining; I haven't run into any problems.

这篇关于如何处理git gc fatal:坏对象refs / remotes / origin / HEAD错误:无法运行重新包装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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