On Thu, Nov 14, 2019 at 9:58 PM David Nalesnik <david.nales...@gmail.com> wrote: > > On Thu, Nov 14, 2019 at 9:49 PM Werner LEMBERG <w...@gnu.org> wrote: > > > > > > >> There is git-fsck . > > >> > > > > > > [dev@lilydev:lilypond-git]$ git fsck > > > Segmentation faultrectories: 45% (116/256) > > > > Ouch. I've never experienced such a thing with git. Maybe something > > is broken with your installation? Does removing and installing again > > help? > > > > > > Werner > > Do you mean removing git itself? I'd like to be able to get back to > the work I just did, if at all possible. > > I deleted the empty object that git commands complained about, and now > git fsck works. > > I get this output > : > [dev@lilydev:lilypond-git]$ git fsck > Checking object directories: 100% (256/256), done. > Checking objects: 100% (402883/402883), done. > error: HEAD: invalid sha1 pointer 76008183503d70d4b37a73f19e60c2438112a5a8 > error: refs/heads/dev/measure_spanner: invalid sha1 pointer > 76008183503d70d4b37a73f19e60c2438112a5a8 > Checking connectivity: 401781, done. > > (dev/measure_spanner is the name of my branch) > > By the way, git reflog gives me this: > > [dev@lilydev:lilypond-git]$ git reflog > fatal: bad object HEAD > > Any ideas how to fix this? > > Thanks, > David
OK, I think I got things operational again, through Googling and blind faith... I manually checked the reflog for my branch: [dev@lilydev:lilypond-git]$ tail -n 2 .git/logs/refs/heads/dev/measure_spanner de92385d89cfbbe5f0aa95a907c5fb98496fcb28 e949231cdff5d174e76af47c49e0b2fd60e912eb Federico Bruni <f...@inventati.org> 1573594713 +0100 reset: moving to HEAD^ e949231cdff5d174e76af47c49e0b2fd60e912eb ec0f38486e4aedcd28a89cca28464ef4f226b7bb David Nalesnik <david.nales...@gmail.com> 1573595114 +0100 commit: Add regression tests (Note: both commits above are authored by me; I was just a little late in updating my config.) I reset HEAD to point to the last commit on my branch: git update-ref HEAD ec0f38486e4aedcd28a89cca28464ef4f226b7bb git fsck then gave this: [dev@lilydev:lilypond-git]$ git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (402883/402883), done. error: refs/heads/dev/measure_spanner: invalid reflog entry 76008183503d70d4b37a73f19e60c2438112a5a8 error: HEAD: invalid reflog entry 76008183503d70d4b37a73f19e60c2438112a5a8 Checking connectivity: 401781, done. I then did: [dev@lilydev:lilypond-git]$ git reflog expire --stale-fix --all [dev@lilydev:lilypond-git]$ git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (402883/402883), done. Checking connectivity: 401781, done. ___________________________ Something must have happened when I attempted to use git rebase -i to squash those two commits. That rebase is gone. Ugh. I hope this does the trick... Thanks, David