Auto packing the repository in background for optimum performance.

在idea执行git命令(比如git commit,git fetch)的时候突然提示如下:

Auto packing the repository in background for optimum performance.
查资料,发现原来是因为自己本地一些 “悬空对象”太多(在使用git命令删除分支或者清空stash的时候,这些对象文件其实兵没有真正删除,它们会成为悬空对象,可以通过merge命令从中恢复一些文件)

解决:
1.输入命令:git fsck --lost-found,可以看到好多dangling commit和dangling blob

Auto packing the repository in background for optimum performance.
2.清空他们:git gc --prune=now,完成 再操作git fetch就不会看到上述提示了

Auto packing the repository in background for optimum performance.