# warning: There are too many unreachable loose objects; run 'git prune' to remove them.

**Code:** `gc warning` · **Category:** Git · **Seen on:** Git

Git’s automatic garbage collection found many unreachable objects and is asking you to prune.

## Meaning

Frequent rebases/amends leave unreachable objects. A gc.log may keep re-triggering the warning.

## Common causes

- Lots of history rewriting
- gc.log left from a previous failed auto-gc

## Quick fix

1. git prune && git gc
2. Delete .git/gc.log if it keeps reappearing

## Detailed fix by platform

### Git

1. `git gc --prune=now && rm -f .git/gc.log`

## How to diagnose

1. **Log** — Does .git/gc.log exist?
2. **Recent change** — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/git/too-many-unreachable-loose-objects)
