0

In .gitignore file I have this

#dependencies
/node_modules

to ignore node_modules folder when committing changes but WebStorm IDE keeps showing changes in the node_modules folder. Anyone encountered this?

enter image description here

I tried this: https://gist.github.com/pavankjadda/2bb6fbdd8786e1f57fd7bcbcc666b51d But it didn't help

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Sakén
  • 197
  • 1
  • 12
  • 4
    The files are almost certainly already being tracked by git, and .gitignore doesn't make git ignore files completely, it just makes `git add` and its siblings ignore files so that you don't start tracking them in the first place. However, if the files are already tracked then the only way to stop tracking them is to remove them from your repository (which will essentially also delete those files on everyone's computers). – Lasse V. Karlsen Oct 08 '21 at 11:25
  • `git rm -r --cached node_modules` – phd Oct 08 '21 at 15:02

0 Answers0