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,完成


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM