I wanted to make a discord bot so I used npm for the first time, I created a package file and installed discord.js but now I have 3000 files that i could sync in my repository, it seems like a stupid thing to do, what should I do?
I guess i should put some files into .gitignore but which ones shoud be left into the repo?
2
Answers
The
node_modules
folder is automatically generated when you usenpm i
ornpm install
, and this can get quite large. It’s best to add thenode_modues
folder to your.gitignore
.You could maybe use this
.gitignore
file: https://github.com/github/gitignore/blob/main/Node.gitignoreYou can always copy this block, it covers up, i guess, anything.
Everything that’s needed to be out of gitignore, it will be left out.