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:
Verify After Critical Operations
After commits on important branches (especiallymain), 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:~/.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.dbmanually — 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.