.gitignore not ignoring node_modules/ folder

Viewed 9510

I am trying to get git to ignore my files in node_modules/ and it doesn't seem to be accepting this change.

Here is the content of my .gitignore file:

node_modules/

and here is my project structure:

enter image description here

I would expect the node_modules folder and all files/folders in it to be ignored by git, but instead I am getting a whole ton of changes listed as pending, and even when I do a git status in the root, node_modules/ is listed as pending. Is there some nomenclature about Windows that is making git act strangely?

2 Answers
Related