Created
November 17, 2018 05:17
-
-
Save leslie-alldridge/d3f1490d0eeb7d3717212cdb435a5f3a to your computer and use it in GitHub Desktop.
remove added folder on GIT
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
How to remove node_modules | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment