错误:bad object refs/remotes/origin/HEAD

Removing target/
Fetching origin
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.

尝试解决但失败:

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

最终解决:

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

Failed to connect to github.com port 443: Operation timed out

关闭VPN 试试,2020-02-20

版权声明:本文为lhsaq2009原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/lhsaq2009/p/07git-yu-dao-de-cuo-wu.html