You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🚩 Create .gitignore, and remove node_modules folder #3
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.
Reacted by Sirinya, Eustațiu Iagăru, Elias, PKurtG, cnikolinka, Snezhana25, Anmol Duggal, Volkan Yıldız, Ian Permana, . and 94 more
Reacted by Grace Loise Amondi, Henry Zhang, Kyle Baker, andersonrey, Marsel, jameeleg, Michael Kang, Jordan Daigle, Carlos Adiel, Manjeet Pardeshi and 19 more
Reacted by Zeeshan Ali Khan, Mussa Charles, Defender007, Motaz Hashhoush, Shravan Devade, Dion Singh, João Pedro Magalhães, MeryFM, Juan Matus, Muhammad Hamdy and 2 more
Reacted by Denis, Manjeet Pardeshi, Dilan Atondo, Felipe Rodrigues, Neel Gagan, Mattia Sinisi, Chris Whitehead, Mussa Charles, Defender007, Motaz Hashhoush and 6 more
create a .gitignore file by using cmd git add .gitignore
add the /node_modules inside the .gitignore file
git push origin master
check the repository with each push.
Reacted by Patricia , Carlos Gumucio, Mohammed, Rehan Asghar, Victory, manojdhumal, h-truongdang, Kalpesh Gavane and AgnikaRouth
Reacted by Anja Lea Brinkmann, Kyle Baker, SamHayzen, Sreecharan Manne, Niraj Pradhan, Dhiraj Nivalkar, Alexander Kovalyov, Sarvjot Singh, Sai Ranjit Tummalapalli, Axel Alba and 26 more
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
Reacted by Nick Sokolov, RemiGolec, Sebastian Campos, Natacha Bartu, Shravan Devade, Dion Singh, Gacem Ben Ayad, Rasel Hossain, Mayank Dutta , Mina Soultan and 12 more
Reacted by Gacem Ben Ayad, Anmol55555, Jinyang Liu, Atif Iqbal and raginimasanta-coditas
Activity
Rushan-Chen commentedon Dec 3, 2017
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_modulesgit commit -m 'Remove the now ignored directory node_modules'git push origin masterThen check your repository.
aemal commentedon Apr 13, 2018
@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?
ummahusla commentedon Apr 16, 2018
@aemal Stephen has great courses, but lack of response on his repositories is a bit frustrating.
hassan-kassim commentedon Oct 26, 2018
.gitignorefile by using cmdgit add .gitignore/node_modulesinside the .gitignore filegit push origin mastercheck the repository with each push.
mussacharles60 commentedon Apr 26, 2021
Add
node_modules/to your .gitignore fileganeshXb commentedon Jun 16, 2021
How to Create .gitignore and add node_modules to it
touch .gitignoreecho node_modules >> .gitignorethen 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_modulesgit commit -m 'Remove node_modules'git push origin masteradded .gitignore and removed node_modules from repository. Check Step…
Create .gitignore, and remove node_modules folder. Reference: Stephen…
jsteave commentedon May 30, 2022
I am also here for the solution of this issue with this #gitignore file To Remove node_modules Folder
joaoavila1987 commentedon Sep 29, 2022
pra min funcionou bem. obrigado