Skip to content

Conversation

@matan129
Copy link
Contributor

@matan129 matan129 commented Apr 20, 2021

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

@spacewander spacewander changed the title Ignore checked-out branches on different worktrees git-delete-merged-branches: Ignore checked-out branches on different worktrees Apr 20, 2021
@spacewander spacewander merged commit 1894f45 into tj:master Apr 22, 2021
@matan129 matan129 deleted the patch-1 branch April 22, 2021 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants