How to remove node_modules Create a .gitignore file in the git repository if it does not contain one Open up the .gitignore and add the following line to the file node_modules Remove the node_modules folder from the git repository