我的本地git损坏了。我该如何解决。我尝试使用git pull
进行修复,但出现以下错误
error: cannot lock ref 'refs/remotes/origin/test_cases': unable to resolve reference 'refs/remotes/origin/test_cases': reference broken
From https://bitbucket.org/ManuChadha/codingjedi
! [new branch] test_cases -> origin/test_cases (unable to update local ref)
我跑了git fsck
并得到了输出
error: Invalid HEAD
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2852/2852), done.
error: refs/heads/test_cases: invalid sha1 pointer 0000000000000000000000000000000000000000
error: refs/remotes/origin/test_cases: invalid sha1 pointer 0000000000000000000000000000000000000000
error: bad ref for .git/logs/HEAD
error: bad ref for .git/logs/refs/heads/test_cases
error: bad ref for .git/logs/refs/remotes/origin/test_cases
dangling commit 0ea928e8d011907e77791327387d30a6ee591e1a
dangling commit f973890b94be93ca9edc753ed4091af0c29655ed