website/versioned_docs/version-1.0.0/cli-reference/flatten.md
Generated from bd help --doc flatten
Nuclear option: squash ALL Dolt commit history into a single commit.
This uses the Tim Sehn recipe:
This is irreversible — all commit history is lost. The resulting database has exactly one commit containing all current data.
Use this when:
Examples: bd flatten --dry-run # Preview: show commit count and disk usage bd flatten --force # Actually squash all history bd flatten --force --json # JSON output
bd flatten [flags]
Flags:
--dry-run Preview without making changes
-f, --force Confirm irreversible history squash