Repos and worktrees

Clone a repo onto the machine once. Each task runs in its own worktree, so parallel agents never share a branch.


Cloning a repo

Add a repo and it is cloned straight onto the machine, not onto your laptop. Clone over HTTPS with a token, or over SSH once your keys are added. After that the repo is on the machine's disk and every terminal, agent, and preview works against that one copy.

git clone git@github.com:you/web.git
cd web

A worktree per task

A worktree is a second working directory for the same repo, checked out to its own branch. Give each task one, and two agents can build different features at once without touching each other's files or fighting over the branch.

# one agent on a feature, another on a fix, same repo
git worktree add ../web-settings feat/settings
git worktree add ../web-login    fix/login-retry

In the app each worktree shows up under the repo with the branch it is on, so you can tell at a glance which agent is where.

Where it lives

Repos sit under your home directory on the machine's own disk. They stay between sessions and through a pause; only deleting the machine removes them. Nothing is synced back to your laptop unless you push it, so closing Cubs leaves the work exactly where it is.