summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Ritter <drew@primeradiant.com>2026-04-07 10:48:24 -0700
committerDrew Ritter <drew@primeradiant.com>2026-04-07 10:48:24 -0700
commit4c49406d22c6e36acabf7f84d786294fdaf730bf (patch)
treed71e78228ba5a53d94821276984cf930c8f7300e
parent238167f2913b7898b7506a3e6dfb90ce038edfc2 (diff)
fix: remove incorrect hooks symlink step from worktree skill
Git worktrees inherit hooks from the main repo automatically via $GIT_COMMON_DIR — this has been the case since git 2.5 (2015). The symlink step was based on an incorrect premise from PR #965 and also fails in practice (.git is a file in worktrees, not a dir). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-rw-r--r--skills/using-git-worktrees/SKILL.md14
1 files changed, 0 insertions, 14 deletions
diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md
index b079139..df9a0b9 100644
--- a/skills/using-git-worktrees/SKILL.md
+++ b/skills/using-git-worktrees/SKILL.md
@@ -109,19 +109,6 @@ git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
```
-#### Hooks Awareness
-
-Git worktrees do not inherit the parent repo's hooks directory. After creating the worktree, symlink hooks from the main repo if they exist:
-
-```bash
-MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
-if [ -d "$MAIN_ROOT/.git/hooks" ]; then
- ln -sf "$MAIN_ROOT/.git/hooks" "$path/.git/hooks"
-fi
-```
-
-This prevents pre-commit checks, linters, and other hooks from silently stopping when work moves to a worktree.
-
**Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), treat this as a restricted environment. Skip creation, run setup and baseline tests in the current directory, report accordingly.
## Step 3: Project Setup
@@ -226,7 +213,6 @@ Ready to implement <feature-name>
- Verify directory is ignored for project-local
- Auto-detect and run project setup
- Verify clean test baseline
-- Symlink hooks after creating worktree via 1b
## Integration