git报错fatal: loose object ....(stored in .git/objects/....) is emtpy

主要是非正常关机。把.git给破坏了

参考https://stackoverflow.com/questions/12571557/fixing-a-corrupt-loose-object-as-a-commit-in-git/12583865

 

直接 git init 重新下载.git

然后重启下vscode 就找到当前分支了。

 

发现不知不觉居然.git下载一次要100多M。主要是每次要产生png jpg图像,每次好几张几百K的图,然后之前几次调整文件夹结构,底图4M。

在.gitignore里添加

app/tests/*.png
app/tests/*.jpg
不跟踪test产生的图
 
 
posted @ 2018-12-11 10:24  永远的幻想  阅读(1057)  评论(0编辑  收藏  举报