-3

I want to upload my React Project to GitHub but I want to exclude the node modules folder, how do I do that ?

neil
  • 353
  • 1
  • 8
  • 17
  • 3
    Add a `.gitignore` file to the repository and put `node_modules` in it. See https://git-scm.com/docs/gitignore – Nick Oct 17 '21 at 01:39

2 Answers2

4

Create a .gitignore file at the root of your project and add this line:

/node_modules

You can learn more here: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

mpora
  • 1,411
  • 5
  • 24
  • 65
0

Just add a .gitignore file at the root folder/directory of your project and the add node_modules folder to ensure that it is not pushed to your remote repository.

enter image description here

Dev Enock
  • 86
  • 7