How to gitignore node modules

In this article let’s discuss about How to gitignore node modules. Let’s go through the following methods without any delay.

Method 1:

node_modules/

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

touch .gitignore  //to create a .gitignore if you dont have one
echo "node_modules/" >> .gitignore //this adds node_modules to gitignore
cat .gitignore //checks what files you have in your gitignore

Hope the above solution works.

Realted Posts : How to compile h5py