git使用遇到问题1

1、上传代码过程中遇到 git help gc错误解决方法,有两种方式,推荐第一种方式。

$ git fsck

$ git gc --prune=now

如果执行完上面的命令还是不行的话,可以尝试删掉.gitobjectspack下的文件。重新pull就可以了。记得做好备份。

2 遇到如下问题

* branch master -> FETCH_HEAD
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 330851, done.
输入:git config --global gc.auto 0 即可,亲测

原文地址:https://www.cnblogs.com/mary-123/p/11150082.html