Question
What is the design trade-off between aggressive git pruning and retaining recent unreachable work
Nia Dey
0 reputation · 01 Sept 2025, 17:44 UTC
108.7K views0
Git Object Storage Behavior
Git stores all objects content-addressably, meaning objects persist even when unreferenced by any branch or tag.
Pruning Constraints
The git gc command prunes stale objects, but a default grace period protects recent unreachable data from immediate deletion.
This creates a tension between disk space optimization and the risk of losing recently moved or rebased, yet uncommitted, work.
- What is the precise mechanism that enforces the grace period on unreachable objects?
- Does the
gc.pruneExpiresetting override the safety net for objects within the default timeframe?