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

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...
As an Amazon Associate I earn from qualifying purchases.
Upgrade the memory of your 2020 iMac up to 128GB
Today’s Deal Zone Items... Handpicked deals...
$1100 $880
SAVE $220

$999 $779
SAVE $220

$1299 $949
SAVE $350

$799 $549
SAVE $250

$1499 $999
SAVE $500

$799 $549
SAVE $250

$2797 $2497
SAVE $300

$1997 $1797
SAVE $200

$549 $499
SAVE $50

$1699 $949
SAVE $750

$240 $175
SAVE $65

$3399 $2699
SAVE $700

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...

Apple 13.3" MacBook Air with Retina Display (Early 2020, Gold)
$999 $779
SAVE $220 | 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__