Repository

willhackett/wtdb

wtdb

Copy databases and update environment variables when spawning new git worktrees.

11stars

Open github.com

willhackett/wtdb

wtdb

CLI tool that automatically copies a PostgreSQL database and environment files when creating a new git worktree, preventing schema conflicts between parallel branches.

Visit project

Show me a random project

First shared
Jun 14, 2026
HN activity
50

Show HN@whhJun 14, 2026

Show HN: Wtdb – give every Git worktree its own database

I run a lot of agentic coding sessions in parallel, each in its own git worktree. Every worktree points at the same local Postgres though, so the moment one branch runs a migration it changes the schema out from under the others. I'd end up with agents tripping over each other, or me babysitting which branch "owned" the DB at any given moment. I made this to fix it. I hope you might find it helpful too.

Community

Hacker News discussion

Loading the thread…