Because I've been rsyncing my Git repository between various places, I'm now stuck with a broken Git repository. When I do git log
I get a correct history, but when I do git status
I get
fatal: unable to read 563e4c9abcd4114e08255db989f0f53426bdeff7
So after some searching around I tried git fsck
:
Checking object directories: 100% (256/256), done.
missing blob 33244941016301570dccdcdc95e543910109d0a8
dangling blob 59f44441e6437ebc4d40182eb8a10d3e07fe367b
missing blob 5dc8ab1804acb58fc658bcd6152fbb246290c8ae
dangling blob 698c775f2599fad3d09906dead4dc67743a984bd
dangling blob 922003b8433bcad6ce9778a37628d738faa26389
dangling blob c33c0528bfee55b04d99de4580da49de4413329b
dangling blob e5107c118bde0edbe5dfb994cb6a50d235c3f06b
dangling blob 437573e539572454cb868ca5a0f5074b96d777ac
missing blob 468d1856336eaa1ce8006f38ce779c0d997c8d48
dangling blob 6fc9c88708d7d5ca455e68781472bdea119997eb
dangling blob 7225d0147fa566369ba3024324b527a7adeac094
dangling blob bb8125d15579fcf37925f09cd1883b15272f9f0d
missing blob c8095f49253ac3787a6f86943160eda2c78a6a28
dangling blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
dangling blob 0bdaed084e15add987ef86fe84f435d085475995
dangling blob 36ee13c9b334da090ea6b194606df8a2852b3b3a
missing blob 563e4c9abcd4114e08255db989f0f53426bdeff7 <= the one which results in the fatal error.
dangling blob 84f2f2a9d1d051e6418a787ca90e75446f712866
dangling blob c636d85269838efecbb496eda5a8cfd8ec753d69
dangling blob cb7a8494bfc86e894c0c6e268308ddc1dd6d713c
dangling blob d166fff9e1c85ab9f0f4f620119181c5f76c2a53
dangling blob d3b6f194df857412481a318d4275faeb6689e4a0
missing blob db9a6744bc0df03cf685296695bea6324f23e0ac
dangling blob def6a6a18457989c7d18825c7c1bbfeefc8b261d
and about 20 more..
And from here I'm kind of lost. I read something about running git reflog expire --expire=now --all
, but that doesn't do anything for me.
All the files in my repository are still present and safely backed up, so that's not a problem. I would like to get my repository history back though. What steps can I take from this point?
git fsck --no-dangling
. Dangling objects are not a problem. But missing objects are. – Bateman