git Auto packing the repository in background for optimum performance

遇到问题:

       git本地仓库,如果长时间不进行清理,几个月以后的某一天,可能拉取代码的时候突然提示你  

       git Auto packing the repository in background for optimum performance. See "git help gc" for manu...

原因解释:

       自己本地一些 “悬空对象”太多(git删除分支或者清空stash的时候,这些其实还没有真正删除,成为悬空对象,我们可以使用merge命令可以从中恢复一些文件),

解决方案:

       1.输入命令:git fsck --lost-found,可以看到好多“dangling commit” 
       2.清空他们:git gc --prune=now,完成

猜你喜欢

转载自www.cnblogs.com/yuzhaoblog/p/12377718.html
今日推荐