Skip to main content
Execute qualquer Skill no Manus
com um clique

async-doc-hook-autodocs-worktree-locks-branch-checkout

Estrelas2
Forks0
Atualizado8 de julho de 2026 às 11:09

Fix for `git checkout <branch>` failing with `fatal: '<branch>' is already used by worktree at '.../autodocs-<name>'` (or a subagent reviewing a PR reports a path like `.../worktrees/autodocs-<topic>/...`). Use when: (1) right after a commit whose hook printed `[post-commit] Python files changed — running doc update in background...`, a later branch switch is blocked; (2) you can't check out the branch you just committed to because "another worktree" holds it; (3) a review/subagent cites a file path under an `autodocs-*` worktree you never created. Root cause: the async post-commit doc-update hook spawns its OWN git worktree on the active branch (git forbids a branch being checked out in two worktrees). Fix: `git worktree remove --force` the autodocs worktree (after confirming it committed nothing), then checkout proceeds. Distinct from the index.lock variant — see worktree-index-corrupt-async-post-commit-hook.

Instalação

Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.

SKILL.md
readonly