Skip to content

Try our new Crash Courses!

Become a member using the button below to hide this banner and gain access to our new Crash Courses.

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