FullstackReactCode icon indicating copy to clipboard operation
FullstackReactCode copied to clipboard

🚩 Create .gitignore, and remove node_modules folder

Open ummahusla opened this issue 7 years ago • 8 comments

It's not really a good practice to keep no modules in the git repository.

  • [ ] Create gitignore
  • [ ] Remove node_modules

ummahusla avatar Aug 29 '17 19:08 ummahusla

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.

Rushan-Chen avatar Dec 03 '17 02:12 Rushan-Chen

@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 avatar Apr 13 '18 20:04 aemal

@aemal Stephen has great courses, but lack of response on his repositories is a bit frustrating.

ummahusla avatar Apr 16 '18 07:04 ummahusla

  • 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.

hassan-kassim avatar Oct 26 '18 11:10 hassan-kassim

Add node_modules/ to your .gitignore file

mussacharles60 avatar Apr 26 '21 01:04 mussacharles60

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

ganeshXb avatar Jun 16 '21 20:06 ganeshXb

I am also here for the solution of this issue with this #gitignore file To Remove node_modules Folder

jsteave avatar May 30 '22 00:05 jsteave

pra min funcionou bem. obrigado

joaoavila1987 avatar Sep 29 '22 18:09 joaoavila1987