All Posts by Date or last 15, 30, 90 or 180 days.
also by Lloyd: diglloyd.com photography and WindInMyFace.com

Thank you for buying via links and ads on this site,
which earn me advertising fees or commissions.
As an Amazon Associate I earn from qualifying purchases.

Other World Computing...
B&H Photo...
Amazon
As an Amazon Associate I earn from qualifying purchases.
Upgrade the memory of your 2018 Mac mini up to 64GB
Upgrade the memory of your 2018 Mac mini up to 64GB

Corrupted .git/index File: “git fatal: unordered stage entries in index”

This is a post for geeks like me using the git source code repository.

UDPATE 2021-10-11: all this trouble was really the result of bad memory in the server.

...

Today my web server somehow corrupted its .git/index file, rendering it impossible to pull any updates:

git fatal: unordered stage entries in index

I think I might have hit control-C at the wong time, and git corrupted the index file.

Because the repo is ~364GB, it is not an option to just pull it again! Yes, I know I am abusing git for a massive website—it was never designed for a repo that will soon approach half a terabyte. But as a testament to how well written it is, it has worked great.

I was shitting bricks that this meant a 300 mile drive home, then a visit to the Tier 1 server room in order to manually copy over a fresh/good git repo.

As it turns out, this simple approach worked just fine to rebuild .git/index:

rm .git/index
git reset

After 30 minutes or so, the job was done; git has to read the entire set of pack files totaling ~364GB, so it took a while even on an SSD.

View all handpicked deals...

Sony X85J 75" Class HDR 4K UHD Smart LED TV
$1798 $1298
SAVE $500

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | Twitter
Copyright © 2020 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__