Git · Junior · Question 11 of 75

Which .gitignore line ignores every node_modules folder in the project?

Explanation

A pattern without a leading slash matches at any depth, and the trailing / limits it to directories. A leading / would match only at the repository root.

Further reading

Problem with a question

Git · Junior · question 11

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