I have been wrestling with this problem for hours. My local repo is somehow missing a commit
> git reflog expire --stale-fix --all
error: refs/tags/12.01.02 does not point to a valid object!
error: Could not read 95eeac3b5f441c9ebbd89508896c572e3eb17205
fatal: Failed to traverse parents of commit 6c24f6ea7c0452e70dea6332c6959dad6c71305f
and
$ git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (159800/159800), done.
error: refs/tags/12.01.02: invalid sha1 pointer 95eeac3b5f441c9ebbd89508896c572e3eb17205
error: HEAD: invalid reflog entry 95eeac3b5f441c9ebbd89508896c572e3eb17205
I've been running through questions on fixing the problem. Specifically, I ran into this answer:
The first thing you can try is to restore the missing items from backup. For example, see if you have a backup of the commit stored as .git/objects/98/4c11abfc9c2839b386f29c574d9e03383fa589. If so you can restore it.
So, I found the commit was in the remote on GitHub. So I made a fresh clone in a different directory, but /objects
is mostly empty. Is there a way to regenerate the objects file for just one commit?