Home > OS >  How to ignore node_modules using .gitignore?
How to ignore node_modules using .gitignore?

Time:11-10

I'm not sure how to ignore files on .gitignore, I think it has 3 options but I don't know the correct one

  1. /node_modules
  2. .node_modules
  3. .node_modules/

Please, can you tell me which is the correct one or if none of the 3 works, can you tell me how to ignore files on .gitignore?

I really appreciate any help you can provide.

CodePudding user response:

use node_modules or /node_modules both should work also try to look at the node.gitignore, it will give you an idea on what to ignore in your project

CodePudding user response:

the node_modules directory isn't hidden. You should just be able to do node_modules

  • Related