Worktree Ls banner
igerber igerber

Worktree Ls

Git community

Description

--- description: List all active git worktrees with status argument-hint: "" --- # List Git Worktrees ## Instructions ### 1. Get Worktree List Use porcelain format for reliable, machine-parseable output: ```bash git worktree list --porcelain ``` ### 2. Parse and Check Status Parse the porcelain output into records. Each worktree is a block of lines separated by a blank line, with fields: - `worktree <path>` — the absolute path - `HEAD <sha>` — the full commit hash - `branch refs/heads/<na

Installation

Installs to ~/.claude/commands/igerber-diff-diff-worktree-ls.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/igerber/diff-diff/HEAD/.claude/commands/worktree-ls.md -o ~/.claude/commands/igerber-diff-diff-worktree-ls.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository