If it's a ref somewhere then it'll just be a string of the hash deadbeef style. Just open the file up and change it to another commit hash or just delete the ref completely.
Try something like:
grep -r "1cae71a9" ./.git/
And see if it comes up somewhere. My guess is that it's a ref for some old branch pointing at a commit that isn't around.
That won't work, as loose objects are stored zlib-compressed in .git, and packed objects can be stored in a delta format. You'd need something like this:
Thank you! This has been running for several hours now. If this allows me to fix it, I'll be very grateful. I've been delaying re-rooting all those worktrees for 6mo or more.. :)
Try something like:
And see if it comes up somewhere. My guess is that it's a ref for some old branch pointing at a commit that isn't around.