# error: object file .git/objects/x is empty / fatal: loose object is corrupt

**Code:** `corrupt object` · **Category:** Git · **Seen on:** Git

The local Git object database is corrupted — usually after a crash, disk full or sync tool interference.

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

1. Back up uncommitted work, then re-clone
2. Try git fsck --full to see damage
3. Fetch missing objects from the remote

## Detailed fix by platform

### Git

1. `git fsck --full`

## How to diagnose

1. **Damage** — What does git fsck report?
2. **Location** — Cloud-synced folder?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/git/object-file-is-empty)
