Worktrees

Git worktrees let one repository have multiple checked-out branches in separate folders. Athas treats each worktree as a real workspace folder, so editor tabs, terminals, Git status, and window state follow the checkout you open.

When to Use Worktrees

  • Keep a feature branch open while reviewing another branch
  • Run a long task in one checkout without disturbing your main project
  • Compare or test separate branches in separate Athas windows
  • Keep branch-specific terminals, buffers, and Git status isolated

Open a Worktree

  1. Open a Git repository in Athas.
  2. Open the Git sidebar.
  3. Switch to the Worktrees tab.
  4. Click a worktree to open it in the current window.

Opening a worktree uses the same folder-open flow as any other project. The selected worktree becomes the active workspace project, and the Git sidebar starts reading status from that path.

Open in a New Window

Right-click a worktree and choose Open in New Window to launch that checkout in a separate Athas window. Use this when you want each branch to keep its own window, terminals, and editor layout.

Create a Worktree

Use the + button in the Worktrees tab to add another checkout.

  • Enter the destination path for the new checkout
  • Optionally create a new branch for that worktree
  • After creation, Athas can open the new checkout as the active workspace

The footer worktree switcher also supports searching existing worktrees and creating one from a new path.

Remove and Prune

Right-click a worktree to remove it.

  • Remove uses Git's normal safe removal path
  • Force Remove is separate and can discard uncommitted changes in that checkout
  • Prune appears only when Git reports prunable worktrees

Athas keeps force removal behind an explicit menu item so ordinary cleanup does not accidentally discard local work.