错误描述
error: object file .git/objects/9a/83e9c5b3d697d12a2e315e1777ceaf27ea1bab is empty
fatal: loose object 9a83e9c5b3d697d12a2e315e1777ceaf27ea1bab (stored in .git/objects/9a/83e9c5b3d697d12a2e315e1777ceaf27ea1bab) is corrupt
解决办法
$ # 在出现上述错误的文件夹下执行以下命令
$ rm -fr .git
$ git init
$ git remote add origin your-git-remote-url # your-git-remote-url 是远程 git 仓库的地址
$ git fetch
$ git reset --hard origin/master
$ git branch --set-upstream-to=origin/master master
简书作者 小菜荔枝 转载请联系作者获得授权
网友评论