.gitignore is not ignoring node_modules, why not?

what am i doing wrong? i have a .gitignore file with ./node_modules in the first line, but when i try to install packages, over 1700 files showing as changes to commit. Many (if not all, haven’t checked) of these files are in node_modules folder. so why is git not ignoring them?
thank you for any advice!

Run git rm -rf --cached node_modules in the Shell tab, that will remove old cached files from GIT in the node_modules folder.

1 Like

thanks for the advice. do i do that in main or a new branch and then merge? does it matter?

I mean, I suppose it doesn’t matter, but it’s probably easier to just do it on main.