git 错误 fatal: loose object...is corrupt解决方法

git 错误 fatal: loose object...is corrupt解决方法

error: object file .git/objects/d2/e3130af1e4f5f0a94d8290efa2149dcc08b303 is empty
error: object file .git/objects/d2/e3130af1e4f5f0a94d8290efa2149dcc08b303 is empty
fatal: loose object d2e3130af1e4f5f0a94d8290efa2149dcc08b303 (stored in .git/objects/d2/e3130af1e4f5f0a94d8290efa2149dcc08b303) is corrupt

解决方法:

    $ rm -fr .git  

    $ git init  

    $ git remote add origin your-git-remote-url  

    $ git fetch  

    $ git reset --hard origin/master  

    $ git branch --set-upstream-to=origin/master master   

你可能感兴趣的:(发现新bug)