Worktrees
Chapters
You have three tasks for your app and three agents ready to take them. In one folder they trip over each other: one edits a file another is testing, and their dev servers want the same port. A fresh checkout for each of them needs its node_modules and its setup before anyone can start.
In Offsite each task gets its own worktree. It sits in a column beside your project’s board and opens as a board of its own, with its own branch, its agents and a window of 100 ports, so three versions of your app run at the same time. You set up your worktrees once, by hand or with an agent. Every new one gets its node_modules in seconds, cloned on the disk, and its agent starts when the setup is done. When a task is done, you open a pull request or merge it from its Git card, and every worktree stays in view, including the ones you made elsewhere, until you clean it up.
Tips
- Press + in the Worktrees column to start one. Begin the task with
#123, or paste an issue’s URL into it, and the worktree is linked to that issue. - Every app you run in a worktree gets its port as
$OFFSITE_PORT. Write--port $OFFSITE_PORTinto its Run entry, and each worktree’s copy takes a port of its own. - A repository with a
.worktreeincludefile and no setup yet starts with its paths in Smart Copy. - Host Settings › Worktrees suggests the worktrees that look done: merged into the base, never given a commit, or without a commit or checkout for 30 days.