Skip to main content
This describes what happens when you check out a branch that another worktree already has checked out, and when you clean up a worktree that has disappeared.

Checking out a branch that is in use

Git prevents more than one worktree from checking out the same branch at the same time. ParalleLane turns this failure into a confirmation modal that asks whether to switch to the worktree that has the branch checked out.
1

Try to check out a branch that is in use

Check out a branch from the sidebar or the graph.
2

The switch confirmation modal appears

ParalleLane checks git worktree list to find the worktree that has the branch checked out, opens a Switch to another worktree modal, and shows the target worktree and branch. See Checkout for what the modal looks like.
3

Switch or cancel

Click Switch and you move to that worktree. Cancel closes the modal without changing anything.
If the current worktree has uncommitted changes, it goes through the checkout modal (handling local changes) first, before checking whether the branch is in use.

Cleaning up ghost and invalid worktrees

The working directory is gone, but the .git/worktrees/<id>/ metadata remains. It shows up dimmed in the sidebar with a Missing badge.
A close-up of a ghost worktree row in the sidebar. The folder icon and branch name are dimmed, and a ghost icon with a 'Missing' badge sits on the right
Click the row and a Worktree directory is gone warning toast appears with a Prune button. Click it and ParalleLane prunes every ghost worktree in that repository with git worktree prune, and reports how many were removed. Clicking a ghost row doesn’t select it. The worktree you’re currently viewing stays as it is.
The worktree you had selected has dropped out of Git’s worktree list entirely, for example after an external deletion. In this case, ParalleLane deselects it and shows a Worktree not found warning toast with a Clean up button.Click it and ParalleLane clears the cache kept for that worktree (commit graph, repository overview, Working copy state, LFS, and undo history), runs prune, then re-queries the list to remove the stale row.

Bulk and automatic cleanup in Settings

Handle it in the Invalid worktrees item under Settings → ParalleLane → General.
  • Prune now bulk-prunes ghost worktrees across every registered repository.
  • Turning on the Automatically prune invalid worktrees toggle (off by default) prunes automatically every time the worktree list is read.
A close-up cropped to just the Invalid worktrees settings row in Settings → ParalleLane → General. The bold title and the ghost-worktree cleanup description sit on the left, and at the right end of the same row, the Prune now button and an unlabeled auto-prune toggle sit side by side, switched off
Prune only removes worktrees whose working directory has actually disappeared. It leaves worktrees that still exist on disk untouched.Removing a worktree that still exists is covered in Create, switch, and delete worktrees, and force-deleting it can lose uncommitted changes.