List all worktrees and see what is checked out where

basics

// what it does

Shows every working tree of the repository — main worktree first — with its path, checked-out commit, and branch (or detached HEAD), plus locked and prunable annotations. Output is identical no matter which worktree you run it from, so it's your map of everything in flight.

// shell

$ git worktree list
$ git worktree list -v

// gotcha

The plain output is aligned for humans and may change between Git versions, and lock/prune reasons only appear with -v. Scripts should parse --porcelain (ideally with -z) instead.

// resources