Lanes, env profiles, and worktrees
Lanes keep branch, env profile, and port pairing together so you can switch local vs staging without hand-editing files.
Typical setup
- Local lane — day-to-day branch and
.envprofile. - Staging lane — UAT branch, staging env profile, optional different port.
- Switch lanes in the project — Rig points at the right env.
Worktrees
When a lane uses a git worktree path, Rig targets that folder so two checkouts of the same repo can stay isolated. Pair with sessions if you fully stop one client stack before starting another.
Related
- Named sessions
- Add a project and start it
- rig CLI: run projects from the terminal
- Env files and secrets in local development
- Env file diff checker
- .env and .env.example checklist: what to commit, ignore, and rotate
- MCP config file locations: where each coding agent reads its servers
- Run & fix guides
- Masked env manager
- Git worktrees with lanes
- Production lane caution
- Freelancer / agency tips