My morning started with git pull
, just like any other morning:
$ git pull
error: unable to resolve reference refs/remotes/origin/card-declined: Undefined error: 0
From github.com:instaedu/instaedu
! [new branch] card-declined -> origin/card-declined (unable to update local ref)
(FYI, "card-declined" is a branch I pushed to GitHub just last night, and hasn't had any activity since then.)
I've never seen that error before, so I looked it up and found this question: git pull fails “unalble to resolve reference” “unable to update local ref”. The top-voted answer there says to try running git gc --prune=now
, so I did that:
$ git gc --prune=now
error: bad ref for refs/remotes/origin/card-declined
error: bad ref for refs/remotes/origin/card-declined
fatal: loose object b28488de1ef3f6887eef99c0316a654d1803e6af (stored in .git/objects/b2/8488de1ef3f6887eef99c0316a654d1803e6af) is corrupt
error: failed to run repack
It didn't seem to fix anything, though now I see that something seems to have been corrupted since yesterday.
Any idea how to resolve this?