DocsWorktree

Worktree

Run Enter Code in an isolated git worktree.

Starting a Worktree session

enter --worktree
enter --worktree feature-auth

How it works

  • A new branch is created from your current HEAD.
  • All changes happen inside the worktree directory.
  • The main repo and other worktrees are unaffected.
  • On exit, Enter Code asks whether to keep or delete the worktree.

When to use Worktree

Use Worktree for risky refactors, running multiple sessions on the same repo, experiments, and code review trials.