Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Using npm with Git


Add the following entry to your .gitignore file:



When using npm, you don’t want to commit your node_modules folder to your repo, so you should add it to your .gitignore file.

You should commit your package.json and package-lock.json files. This will allow other developers who clone your project to download your project’s dependencies using the npm install command.


There are no exercises for this lesson.

Back to: npm Reference > npm Extra