Show status of all worktrees including pending commits and sync state
Generates a comprehensive status report for all Git worktrees, showing uncommitted changes, unpushed commits, and sync state.
/plugin marketplace add iknite/claude-code-marketplace/plugin install worktree-context@iknite-cc-marketplaceShow the status of all worktrees: context, default branch, and feature branches.
!git worktree list
Generate a comprehensive status report for all worktrees:
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || git branch -l main master 2>/dev/null | head -1 | tr -d '* ')
Context branch (root/context or current context location):
git -C <context-path> status --short
git -C <context-path> log origin/context..HEAD --oneline 2>/dev/null || echo "No remote tracking"
Default branch (root/$DEFAULT_BRANCH):
git -C <default-branch-path> status --short
git -C <default-branch-path> log origin/${DEFAULT_BRANCH}..HEAD --oneline 2>/dev/null
All feature worktrees (inside worktree/):
for dir in worktree/*/*; do
if [ -d "${dir}" ]; then
echo "=== ${dir} ==="
git -C "${dir}" status --short
git -C "${dir}" log origin/$(git -C "${dir}" branch --show-current)..HEAD --oneline 2>/dev/null || echo "No remote tracking"
fi
done
For each worktree, report:
| Worktree | Branch | Uncommitted | Unpushed | Behind Remote |
|---|
Where:
Provide a quick summary:
Flag any worktrees that need attention.