Skip to content

Worktrees

You can use the Worktrees tab to manage Git worktrees, separate working directory checkouts of the same repository. Use a worktree when you need to keep an in-progress branch untouched while you check out another branch. Each worktree is a separate folder with its own checkout, so your editor, terminal, and running processes don’t get disrupted.

To open the Worktrees tab, click Git > Worktrees.

Worktree rows are listed alphabetically and display the folder path of the worktree and compact action buttons. Click the worktree to expand the worktree row. The expanded worktree row displays the following information.

  • Commit: The identifying hash of the most recent commit in the worktree.
  • Message: The recent commit message on the worktree.
  • Author: The recent author of the commit on the worktree.
  • Date: The time since the recent commit was created.
  • Branch: The branch of the worktree.

Worktrees are organized into the Favorites section and Other Worktrees section. To favorite a worktree, click the star icon next to the worktree name.

Create a worktree

You can create a worktree based on a new branch or on an existing branch.

You can start either flow from the Worktrees tab, or from the Branch control in the Project Header. In the Branch control, click New worktree… under Create.

To create a new worktree as a new branch, complete the following steps.

  1. In the Worktrees tab, click New Worktree.
  2. In the New Worktree dialog, click New Branch.
  3. In the Base Branch dropdown, select which branch to base the worktree on.
  4. In the New Branch Name field, enter the branch name.
  5. Click Create.

To create a new worktree based on an existing branch, complete the following steps.

  1. In the Worktrees tab, click New Worktree.
  2. In the New Worktree dialog, click Existing Branch.
  3. In the Branch dropdown, select which branch to base the worktree on.
  4. Click Create.

The new worktree opens as a project tab with a worktree badge next to the parent project tab.

Worktree actions

In the expanded worktree row, click the following action icons to perform a worktree action.

IconAction
SwitchSwitches to the worktree.
LaunchOpens the worktree in the file manager.
PathCopies the worktree path.
MergeMerges the worktree into the main branch.
RebaseRebases the current worktree onto the selected worktree. In the Rebase Branch dialog, click Rebase.
CompareCompares the difference in files between the current worktree and selected worktree in Diff view.
CopyCopies the name of the worktree.
LockLocks a worktree to prevent deleting the worktree.
DeleteDeletes the selected worktree. In the Delete Branch dialog, click Delete.

Worktrees in the header

Ordinary repository Project Tabs use the unified Branch control instead of a separate plural Worktrees control. Branch rows identify existing worktrees, Create > New worktree starts setup, branch operations offer Create or Open Worktree contextually, and Manage > Worktrees opens the full Worktrees tab.

A worktree project tab keeps a singular Worktree control because it describes and manages the current worktree’s source relationship and lifecycle.

Worktree project tab

The worktree Project Tab functions as a regular Project Tab. When viewing it, the Worktree control in the Project Header displays the following options.

  • Compare with Source: Compares the current worktree with the source repository.
  • Merge from Source: Merges commits from the source repository to the current worktree.
  • Merge back to Source: Merges commits from the current worktree to the source repository.
  • Delete Worktree: Deletes the current worktree.

When the worktree is behind its source branch, the Merge from Source action shows the available commit count without presenting the normal behind state as a warning. When it is ahead, Merge N commits back into Source… includes the count directly instead of showing a separate Ready status.

Use View Branch Details for general operations on this worktree’s branch, or Manage Worktrees for the full Worktrees tab.

Worktree lists in the header control and Worktrees tab share clickable Name and Activity column headers. The selected ordering is shared between the two surfaces, while favorites remain grouped ahead of other worktrees.