Git · Junior · Question 11 of 75
Which .gitignore line ignores every node_modules folder in the project?
- 1
*node_modules*.js - 2
/node_modules.txt - ✓Correct answer:
node_modules/
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.