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

Links on this site earn me fees or commissions.
As an Amazon Associate I earn from qualifying purchases @AMAZON

Consult with Lloyd: cameras, computers, backup, etc...
Lloyd’s Patreon
Designed for the most demanding needs of photographers and videographers.
The fastest, toughest, and most compatible portable SSD ever with speeds up to 2800MB/s.

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 X80K 75" 4K HDR Smart LED TV
$1198 $1098
SAVE $100 | 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__