bd help --doc compact.
Squash Dolt commits older than N days into a single commit.
Recent commits (within the retention window) are preserved via cherry-pick.
This reduces Dolt storage overhead from auto-commit history while keeping
recent change tracking intact.
For semantic issue compaction (summarizing closed issues), use ‘bd admin compact’.
For full history squash, use ‘bd flatten’.
How it works:
- Identifies commits older than —days threshold
- Creates a squashed base commit from all old history
- Cherry-picks recent commits on top
- Swaps main branch to the compacted version
- Runs Dolt GC to reclaim space