FullstackReactCode
FullstackReactCode copied to clipboard
🚩 Create .gitignore, and remove node_modules folder
It's not really a good practice to keep no modules in the git repository.
- [ ] Create gitignore
- [ ] Remove node_modules
About how to create .gitignore
You can reference the .gitignore template: Node.gitignore 'node_modules/' is added in this '.gitignore'
About how to remove node_modules
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
Then check your repository.
@StephenGrider can you plz implement this issue as I just took your course and love to use this as a boilerplate for most of my students?
@aemal Stephen has great courses, but lack of response on his repositories is a bit frustrating.
- create a
.gitignore
file by using cmdgit add .gitignore
- add the
/node_modules
inside the .gitignore file -
git push origin master
check the repository with each push.
Add node_modules/
to your .gitignore file
How to Create .gitignore and add node_modules to it
- Create a .gitignore file (if it doesn't exist) using:
touch .gitignore
- Add node_modules in .gitignore by adding "node_modules/" in .gitignore OR
- simply run the following:
echo node_modules >> .gitignore
then add, commit and push to the repository.
How to remove node_modules from your repo after adding it to .gitignore
-
git rm -r --cached node_modules
-
git commit -m 'Remove node_modules'
-
git push origin master
I am also here for the solution of this issue with this #gitignore file To Remove node_modules Folder
pra min funcionou bem. obrigado