Skip to content

Instantly share code, notes, and snippets.

@parasharrajat
Forked from lmcneel/remove-node-modules.md
Created July 24, 2019 12:04
Show Gist options
  • Save parasharrajat/3a58d871e7e4a013e501ed8309b8bbbf to your computer and use it in GitHub Desktop.
Save parasharrajat/3a58d871e7e4a013e501ed8309b8bbbf to your computer and use it in GitHub Desktop.

Revisions

  1. @lmcneel lmcneel revised this gist Feb 5, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions remove-node-modules.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,19 @@
    # How to remove node_modules

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

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

    node_modules
    3. Remove the node_modules folder from the git repository

    `git rm -r --cached node_modules`
    4. Commit the git repository without the node modules folder

    `git commit -m "Removed node_module folder"`
    5. Push the repository to github

    `git push origin master`

    After all of that, you should also add the gitignore and commit it to the repository
  2. @lmcneel lmcneel revised this gist Feb 5, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions remove-node-modules.md
    Original file line number Diff line number Diff line change
    @@ -14,5 +14,7 @@
    After all of that, you should also add the gitignore and commit it to the repository

    `git add .gitignore`

    `git commit -m "Updated the .gitignore file`

    `git push origin master`
  3. @lmcneel lmcneel created this gist Feb 5, 2017.
    18 changes: 18 additions & 0 deletions remove-node-modules.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # How to remove node_modules

    1. Create a .gitignore file in the git repository if it does not contain one
    `touch .gitignore`
    2. Open up the .gitignore and add the following line to the file
    node_modules
    3. Remove the node_modules folder from the git repository
    `git rm -r --cached node_modules`
    4. Commit the git repository without the node modules folder
    `git commit -m "Removed node_module folder"`
    5. Push the repository to github
    `git push origin master`

    After all of that, you should also add the gitignore and commit it to the repository

    `git add .gitignore`
    `git commit -m "Updated the .gitignore file`
    `git push origin master`