Skip to content

Untrack 37 node_modules symlinks committed to the repo #34

Description

@ManningWorks

Problem

37 files under node_modules/ are tracked in git despite .gitignore listing node_modules (lines 4-5). They are pnpm symlink artifacts from an old commit that predates (or bypassed) the ignore rule:

  • packages/core/node_modules/ — 26 files (.bin/* symlinks, @testing-library/jest-dom)
  • packages/docs/node_modules/ — 11 files (.bin/* symlinks)

Any pnpm install re-points these symlinks and dirties the working tree, so every install shows phantom modifications that have nothing to do with real changes. This bit the vitest 4 migration work in #33, where 9 of them showed as modified alongside the actual fix.

Fix

git rm -r --cached packages/core/node_modules packages/docs/node_modules
git commit -m "untrack node_modules artifacts"

No working-tree files are deleted (--cached only), and .gitignore already covers them, so they disappear from git entirely.

Verification

After the commit: git ls-files | grep -c node_modules returns 0, and pnpm install && git status --short shows a clean tree.

Effort

Quick win — one command, zero runtime impact.


Surfaced during #33 (vitest 4 migration).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersneeds-triageMaintainer needs to evaluate this issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions