logoalt Hacker News

binsquareyesterday at 3:03 AM1 replyview on HN

It's a different level of isolation, worktrees help agent work on different code repository in parallel but things get wonky once you consider processes and environments variables


Replies

christophilusyesterday at 12:17 PM

The way I do it is each worktree gets its own .env, with dev credentials to whatever it needs access to, and my coworkers have theirs set up to have an isolated Postgres database per worktree, but I didn’t bother with that in my setup— maybe I will, though. It’s a simple script to create a worktree and properly prepare it.