Even after adding the .gitignore
file to the root of the .git
repository, I cannot make git ignore the node_modules
directory.
The files have not been added for Git to track.
I have gone through earlier stack overflow questions, and also tried adding a comment line to the first line, since apparently Git doesn't read the first line of that file, and it still doesn't work. I have tried to use the following command also, with no avail:
git rm --cached -r .
Could anyone help me out? The content of .gitignore
:
#first line
node_modules/