From 088036b3929c18eb70994e1c6ac7ac57d456c0fe Mon Sep 17 00:00:00 2001 From: GradientDescent Date: Fri, 11 Sep 2026 09:35:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20gitignore=20.claude/worktrees/=20?= =?UTF-8?q?=E2=80=94=20harness=20worktrees=20leaked=20into=20main=20as=20g?= =?UTF-8?q?itlinks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .claude/worktrees/ (created by the Claude Code EnterWorktree tool) was not excluded, so a git add -A in the main checkout twice added these nested checkouts as gitlink entries (mode 160000) on local main, plus once dragged in an unrelated stray AGENTS.md. Neither commit was ever pushed; both were reset away. Ignoring the directory outright stops it recurring. Co-Authored-By: Claude Sonnet 5 --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 68c3f20..ecd001f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ # Per-task git worktrees (ADR 0009) — task checkouts live here, never in main workspace .worktrees/ +# Claude Code harness worktrees (EnterWorktree tool) — separate from ADR 0009's +# .worktrees/ above; each is its own git checkout and must never be tracked as a +# gitlink in the parent repo (git add -A here has bitten main more than once). +.claude/worktrees/ + # Python __pycache__/ *.pyc