My gitignore file looks like this:
*.csv
*.dat
*.iml
*.log
*.out
*.pid
*.seed
*.sublime-*
*.swo
*.swp
*.tgz
*.xml
.DS_Store
.idea
.project
.strong-pm
coverage
node_modules
npm-debug.log
server-info
definitions/
Yet, suddenly git status
shows me a lot of npm-debug.log files in red.
I also get the message
nothing added to commit but untracked files present (use "git add" to track)
How do I remove all the npm-debug.log files from my local machine without accidentally deleting any important files?
Also, how do I prevent these files from being created in the first place?