Skip to content

Merged git worktree

Last updated 1 November 2026

What it is, where it lives on your Mac, and whether it’s safe to delete.

Check before deleting

Usually, but look first. Its commits are already in the main branch; git worktree add makes it again, and its build output rebuilds.

Where it is

Usually a second checkout of a repository, made with git worktree add. DiskCity recognises it by what's inside, wherever it is.

What it is

A linked worktree is a second checkout of a repository. When git says its HEAD is already in the main branch, it has no changes, no untracked files and no files git is set to skip, and the only files git ignores in it are build output, everything in it is in the repository or rebuilds.

git removes it its own way (git worktree remove, never --force), so its commits stay, and its branch if it has one. DiskCity asks git again right before, and Autopilot never removes one unasked. A locked worktree, the main checkout, one with submodules or an operation under way, or one whose repository settings could start a command (filters, includes, fsmonitor) stays.

Is it safe to delete?

Usually, but look first. Its commits are already in the main branch; git worktree add makes it again, and its build output rebuilds.

How to remove it

  1. Only when its branch is already merged into the main branch, and git status inside it shows nothing to commit and no untracked files.
  2. Leave anything opened or changed less than 1 day ago (for a folder, its newest file counts). DiskCity waits that long too.
  3. Use the tool's own command, which knows what's still in use: git worktree remove <path>

What DiskCity does with it

DiskCity removes it with the tool's own command, only when you approve. It only suggests it once it hasn't been used for 1 day.

Sources

Checked 2026-10-28.