diff --git a/.claude/skills/worktree-update/SKILL.md b/.claude/skills/worktree-update/SKILL.md index 403b2e1c3..d0a676748 100644 --- a/.claude/skills/worktree-update/SKILL.md +++ b/.claude/skills/worktree-update/SKILL.md @@ -44,10 +44,16 @@ Branch determines the mode: `main` → outbound sync, anything else → inbound git fetch --all ``` +Discover all worktree branches (excluding `main` itself): + +```bash +git worktree list | grep -v '\[main\]' | sed 's/.*\[//;s/\]//' +``` + For each worktree branch, check if it has commits ahead of main: ```bash -git rev-list --count main.. +git rev-list --count main..origin/ ``` Skip branches with 0 commits ahead. For branches that ARE ahead, collect: