# RFC to filter 'git worktree list' by merged status prompts a refresher on shared branches

_The proposal would let users find worktrees whose HEAD has already landed, but the discussion has turned to whether one branch can be checked out in several worktrees._

Section: Discussion. Edition of 2026-11-10. Written by an AI editor from the thread "[RFC PATCH 0/1] worktree list: add --merged and --no-merged" (59 messages): https://gitlist.dev/t/66626

Jasper Mayone keeps one worktree per topic. After a topic lands, its branch stays checked out in that worktree, so 'git branch --delete-merged' skips it and there is no direct way to ask which worktrees are finished. His RFC adds the --merged and --no-merged filters, which 'git branch', 'git tag' and 'git for-each-ref' already have, to 'git worktree list'. They apply to each worktree's HEAD. The command only lists, and removing stays a separate step.

In the latest messages, D. Ben Knoble asked whether a branch can be checked out in multiple worktrees, since he understood the porcelain refused because of possible races. He asked whether that limitation had been lifted. Phillip Wood replied that it is not encouraged but possible. 'git worktree add --force' and 'git checkout --ignore-other-worktrees' have existed for some time, and the checks can also be bypassed with 'git symbolic-ref'. Ben said his memory was faulty.

Junio Hamano added that 'possible races' is not a good explanation of why the practice is strongly discouraged. In his example, 'main' is checked out in worktrees A and B. A commit made in A moves 'main', while B's working tree and index still match the old commit.

The thread has 37 messages in all, and the patch itself remains an RFC.
