error: object file .git/objects/x is empty / fatal: loose object is corrupt
The local Git object database is corrupted — usually after a crash, disk full or sync tool interference.
object file is emptyloose object is corruptfatal: unable to read Meaning
Cloud sync tools (Dropbox, OneDrive) and power loss can truncate object files. If the remote has everything, re-cloning is the quickest fix.
Common causes
- Repo inside a cloud-synced folder
- Disk full or crash during git operations
- Hardware/storage issues
⚡ Quick fix
- Back up uncommitted work, then re-clone
- Try git fsck --full to see damage
- Fetch missing objects from the remote
Detailed fix by platform
Git
git fsck --full
How to diagnose
- Damage — What does git fsck report?
- Location — Cloud-synced folder?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 126 incorrect key file MySQL ERROR 126 (HY000): Incorrect key file for table; try to repair it
- gc warning warning: There are too many unreachable loose objects; run 'git prune' to remove them.
- index.lock exists fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running in this repository
Most viewed in Git
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026