Created
June 22, 2021 12:50
-
-
Save ciamac-da/15cd5d554e196a4aa657628d2595e392 to your computer and use it in GitHub Desktop.
How to get rid of node_modules folder from Github
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is how to get rid of node_modules folder from Github! | |
| 1- Add .gitignore file(must be located in the root directory of your repo). | |
| 2- Write node_modules/ in .gitignore file. | |
| It means ignore all directories called node_modules in current folder and any subfolders. | |
| As alternative you can also use /node_modules or **/node_modules. | |
| ** is used for a recursive call in the whole project. | |
| 3- Open Terminal | |
| 4- git rm -r --cached node_modules | |
| 5- git add -A | |
| 6- git commit -m "node_modules removed" | |
| 7- git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very Nice Bro 👍