Skip to content

Instantly share code, notes, and snippets.

@chayandatta
Created January 27, 2020 13:02
Show Gist options
  • Save chayandatta/da4625b579d6681d76ac53f6747bbb84 to your computer and use it in GitHub Desktop.
Save chayandatta/da4625b579d6681d76ac53f6747bbb84 to your computer and use it in GitHub Desktop.
How to remove node_modules

How to remove node_modules

Create a .gitignore file in the git repository if it does not contain one

touch .gitignore -- Open up the .gitignore and add the following line to the file

.gitignore
node_modules 

-- Remove the node_modules folder from the git repository

git rm -r --cached node_modules

-- Commit the git repository without the node modules folder

git commit -m "Removed node_module folder"

-- Push the repository to github

git push origin master

@MarcinK50
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment