git-delete-merged-branches: Ignore checked-out branches on different worktrees by matan129 · Pull Request #920 · tj/git-extras

Hi,

When using git-worktree, if a different worktree has a checked out branch (i.e not in the state of detached HEAD), this is what the git branch output looks like:

$ git branch
* develop
+ i-am-a-checked-out-branch-on-a-different-worktree
  i-am-another-branch

Meaning - develop is checked out in the current worktree I'm on, and i-am-a-checked-out-branch-on-a-different-worktree is checked out elsewhere.

In any case, we would like to not remove the checked out branch. This is why I filter + out.

Have a nice rest of your day,
Matan