The node_modules folder should not be committed, since it isn't a part of your source code and can be extremely large in size. Don't worry, as long as package.json and package-lock.json are committed, anyone accessing your repo will still be able to create the node_modules folder via npm install.
To exclude node_modules:
create a file in your project root directory named .gitignore
open the file and add just add node_modules
save the file
git will now no longer track the folder and changes in the folder
The node_modules folder should not be committed, since it isn't a part of your source code and can be extremely large in size. Don't worry, as long as package.json and package-lock.json are committed, anyone accessing your repo will still be able to create the node_modules folder via
npm install
.To exclude node_modules:
.gitignore
node_modules
This is standard practice for all NPM projects!