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

问题描述

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

我该如何处理这是什么?

解决方案

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

$ 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 gcworked without complaining; I haven't run into any problems.

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

09-04 20:58