Skip to content

fix: remove stray .claude/worktrees gitlinks that break recursive clone - #17

Open
JathukulanAlphintra wants to merge 1 commit into
pineforge-4pass:corpus/no-account-fxfrom
JathukulanAlphintra:fix/remove-stray-claude-worktree-gitlinks-no-account-fx
Open

JathukulanAlphintra wants to merge 1 commit into
pineforge-4pass:corpus/no-account-fxfrom
JathukulanAlphintra:fix/remove-stray-claude-worktree-gitlinks-no-account-fx

Conversation

@JathukulanAlphintra

Copy link
Copy Markdown

Problem

Six Claude Code worktrees are committed as bare gitlinks (mode 160000) under .claude/worktrees/, with no corresponding entry in .gitmodules:

160000 988f121ead57717e68f5d4b5db969e6e0b17a222 0	.claude/worktrees/feat-A
160000 c07c28d1c995319c754803aa5ee904ec2b7a8288 0	.claude/worktrees/feat-B
160000 36c2d157d5ca59936f4d9549e325494ab9f95f1c 0	.claude/worktrees/feat-C
160000 1158c4469c35ce467f0ea02969bfc37f3e65b90f 0	.claude/worktrees/feat-F
160000 9165e621495e143b9fd8783e85398a5e02ddd2e6 0	.claude/worktrees/feat-G1
160000 ab7cb551403737b8b5ffa5e125778edb0685c70e 0	.claude/worktrees/feat-G2

Git sees "there is a submodule here" but has no URL for it, so any recursive submodule operation aborts:

fatal: No url found for submodule path 'corpus/.claude/worktrees/feat-A'
fatal: Failed to recurse into submodule path 'corpus'

Impact

pineforge-engine consumes this repo as a submodule, so this breaks cloning the engine with --recurse-submodules — which means GitHub Desktop cannot clone pineforge-engine at all, since it always clones recursively. The current workaround is to clone from the command line and run git submodule update --init without --recursive.

The entries are present on every branch in this repo, not just this one.

Fix

  • Remove the six index entries (git rm --cached).
  • Add .claude/worktrees/ to .gitignore so they cannot be re-added.

Scoped deliberately to .claude/worktrees/ rather than all of .claude/, so shared Claude config in this repo stays committable.

Risk

None to file content. These entries were only ever pointers — they have no checked-out tree in this repo, and the commits they reference are not reachable here. git diff --stat against the base is exactly the six removals plus the .gitignore rule; no tracked file content changes.

Verification

After this change, on a clean clone:

git clone --recurse-submodules https://github.com/JathukulanAlphintra/pineforge-engine.git

completes instead of aborting. (Git LFS must be installed — brew install git-lfs && git lfs install — as data/ohlcv_*.csv is LFS-tracked.)

🤖 Generated with Claude Code

Six Claude Code worktrees were committed as bare gitlinks (mode 160000)
under .claude/worktrees/ with no corresponding entry in .gitmodules.

Any recursive submodule operation therefore aborts on them:

    fatal: No url found for submodule path 'corpus/.claude/worktrees/feat-A'
    fatal: Failed to recurse into submodule path 'corpus'

This breaks `git clone --recurse-submodules` of pineforge-engine, which
consumes this repo as a submodule, and so breaks cloning via GitHub
Desktop entirely (it always clones recursively).

Remove the six index entries and add .claude/worktrees/ to .gitignore so
they cannot be re-added. No file content is touched: these entries were
only ever pointers, never checked-out trees.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant