chore(gitignore): ignore node_modules whether it is a directory or a symlink

`node_modules/` matches directories only, and git does not treat a
symlink as a directory. A node_modules symlink therefore stayed visible
to `git add -A`, which is how one was committed on a PR branch (a link to
/home/claude/affaan-m/ecc/node_modules from the environment that wrote
it). Dropping the trailing slash ignores node_modules at any depth whether
it is a directory, a symlink, or a file; installed dependency directories
stay ignored as before, and no tracked path is affected.
This commit is contained in:
montjeffrey
2026-10-09 19:32:26 -04:00
parent 5cc14d7c31
commit d66e684d4f
+2 -1
View File
@@ -37,7 +37,8 @@ Desktop.ini
*.sublime-workspace
# Node
node_modules/
# No trailing slash: a symlinked node_modules is not a directory to git.
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*