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.
Seen on:
Git
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 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026