Skip to main content

Best Practices

Commit Early, Commit Often

Graft commits are cheap. Each commit stores only the files that changed (via content-addressed deduplication). Commit whenever you reach a meaningful state:

Branch Naming

Use descriptive branch names that reflect the purpose or experiment:

Use Bind Mount Mode

For daily use, always initialize with --bind:
Bind mount mode makes commits and checkouts faster by eliminating the Alpine runner bridge step.

Verify After Critical Operations

After commits on important branches (especially main), verify integrity:

One Project Per Container

Each Graft project maps to one target container. If you have multiple database containers (e.g., Postgres + Redis), initialize Graft on each separately:
Each gets its own directory under ~/.graft/.

Pair with Seedling

Graft pairs naturally with Seedling for reproducible test data:

What Not to Do

  • Don’t modify branch directories manually while the container is running. The database engine may overwrite your changes.
  • Don’t delete graft.db manually — it contains the DAG that traces all commit history. Deleting it loses all integrity tracking.
  • Don’t run multiple Graft instances on the same project simultaneously. The SQLite database uses a single connection and concurrent access is untested.