Skip to content

Instantly share code, notes, and snippets.

@Blaisorblade
Last active November 27, 2022 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blaisorblade/aa6f486d303bd20e64ca764061f32397 to your computer and use it in GitHub Desktop.
Save Blaisorblade/aa6f486d303bd20e64ca764061f32397 to your computer and use it in GitHub Desktop.
git: Display with git-show-branch branches that are checked out with worktrees.
#!/bin/sh
# Display with show-branch branches that are checked out with worktrees
git show-branch $(git worktree-branches)
#!/bin/sh
# List branches that are checked out with worktrees
git worktree list --porcelain | sed -ne 's!^branch refs\/heads/!!p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment