git ignore node_modules code example
Example 1: how to gitignore node modules
touch .gitignore
echo "node_modules/" >> .gitignore
cat .gitignore
Example 2: ignore all node_modules
.gitignore
node_modules
Example 3: ignore node modules
# dependencies
node_modules
Example 4: git ignore node_modules
If you add the below text into your .gitignore file,
then it will look for the node_modules directory. Then the node_modules
directory will be ignored.
node_modules/
Example 5: git ignore node modules
node_modules/
Example 6: add node modules to git ignore
## New Solution:
## create .gitignore & add node_modules
git rm -r --cached .
git add .
git commit -m"removed all files from gitignore"
git push origin master