Git · Junior · Question 53 of 75

Why is node_modules usually not committed?

Explanation

Commit package.json and the lockfile instead: npm ci installs exactly the same versions on any machine, and the repository stays small.

Further reading

Problem with a question

Git · Junior · question 53

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz