0

My gitignore file is not ignoring the node_modules folder. This causing the folder is uploaded in github.

I have attached some commands that are included in the screenshot.

This is the screenshot of my folder directory and code

  • might be typo make sure that it is /node_modules in .gitignore or provide minimal repository to reproduce it via github – Indraraj26 Oct 30 '21 at 07:22
  • If you spelt node_modules correctly in the .gitignore file, it might be that you initially had committed the code to git. You first need to remove it from git then make a new commit with node_modules added in the .gitignore file. To remove the already tracked file, do: 'git rm -rf --cached node_modules' Then commit your new changes, then node_modules will be ignored. – The Nerdy Geek Oct 30 '21 at 23:47

0 Answers0