最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】git pull报错:Auto packing the repository fatal failed to run repack

Git crifan 1130浏览 0评论
折腾:
【未解决】批量处理gitbook的脚本时忽略掉已处理的book
期间,先去解决git的问题:
cd /Users/crifan/dev/dev_root/github/github.io/crifan.github.io
 [email protected]  ~/dev/dev_root/github/github.io/crifan.github.io   master  git pull
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: 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.

fatal: failed to run repack

Already up to date.
git pull fatal failed to run repack
garbage collection – git gc error: failed to run repack message – Stack Overflow
说是VS有问题。
关闭VSCode,重启VSCode。再去试试。
问题依旧。
待会试试:
git gc --aggressive --prune=now
How to handle git gc fatal: bad object refs/remotes/origin/HEAD error? – Stack Overflow
 mv .git/refs/remotes/origin/HEAD /tmp
mv: rename .git/refs/remotes/origin/HEAD to /tmp/HEAD: No such file or directory
然后
git gc
很慢,要等待:
 git gc             
Enumerating objects: 21046, done.
Counting objects: 100% (21046/21046), done.
Delta compression using up to 4 threads
Compressing objects:  97% (13274/13619)   
 git gc             
Enumerating objects: 21046, done.
Counting objects: 100% (21046/21046), done.
Delta compression using up to 4 threads
Compressing objects: 100% (13619/13619), done.
fatal: sha1 file '.git/objects/pack/tmp_pack_VpaJfb' write error: No space left on device
fatal: failed to run repack
刚才是巧了,硬盘空间不足,重新试试
git gc
Enumerating objects: 21046, done.
Counting objects: 100% (21046/21046), done.
Delta compression using up to 4 threads
Compressing objects: 100% (13619/13619), done.
Writing objects: 100% (21046/21046), done.
Total 21046 (delta 11484), reused 12484 (delta 6425)
Removing duplicate objects: 100% (256/256), done.
好像好了。
然后再去看看:
 git pull
Already up to date.
没问题了。
【总结】
此处:
git pull
报错:
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: 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.


fatal: failed to run repack


Already up to date.
原因:
好像之前内部执行有问题。
解决办法:
用gc=自动垃圾清理:
git gc
即可。

转载请注明:在路上 » 【已解决】git pull报错:Auto packing the repository fatal failed to run repack

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.128 seconds, using 20.56MB memory