# Why Your Setup Script Must Support Git Worktrees for Parallel Development

Original title: Setup Script Should Support Git Worktrees

> Hacker News story 49085449 · language: en · submitted 2026-07-28
> Web version: https://zeli.app/story/49085449
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 24 · by [speckx](<https://news.ycombinator.com/user?id=speckx>) · 💬 10
[original](<https://piechowski.io/post/setup-script-git-worktrees/>) · [HN discussion](<https://news.ycombinator.com/item?id=49085449>)

## Summary

I argue that modern setup scripts must support Git worktrees to enable safe parallel development, especially with coding agents. Instead of running separate Docker stacks for every branch, I advocate sharing infrastructure while isolating ports, databases, and state. This approach ensures that multiple worktrees can run simultaneously without conflicts, turning a simple checkout into a fully functional environment with one command.

## Key quote

> Running a complete Docker stack for every worktree is the simplest mental model and often the wrong default.

## HN discussion (10 comments)

### [dewey](<https://news.ycombinator.com/item?id=49086377>)

> To the blog post author commenting here: Your comment got flagged / dead, probably because it reads as AI generated so it won't be visible to anyone.

### [tracker1](<https://news.ycombinator.com/item?id=49086981>)

> I've been doing similar for many scripts within project workflows... I've started calling the directory in question ./run/ by convention, so I type run/scriptname to run stuff... I've got bash (extnsionless) and powershell (ps1) scripts in place on my work project).
>
> I'll also lean into docker+compose usage for any background services, and even development in order to reduce the running footprint switching projects.

### [hmokiguess](<https://news.ycombinator.com/item?id=49087170>)

> How amazing that git launched this way ahead of it becoming the ubiquitous choice for AI native development workflows

---

## Cite

- Page: https://zeli.app/story/49085449
- Date: 2026-07-28
- Source: piechowski.io (https://piechowski.io/post/setup-script-git-worktrees/)
- Hacker News: https://news.ycombinator.com/item?id=49085449

## Other languages

- zh: https://zeli.app/zh/story/49085449 · markdown: https://zeli.app/zh/story/49085449.md
