🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Git Config, .gitignore and Hooks: all 10 questions

Quiz: Git Config, .gitignore and Hooks · Question 4 of 10

The pattern /config.local.json is in the root .gitignore. Which file is ignored?

The pattern /config.local.json is in the root .gitignore. Which file is ignored?

  1. A.config.local.json in the top folder only
  2. B.src/config.local.json only
  3. C.Every config.local.json in every folder
  4. D.No file, because of the leading slash
Answer & explanation

Correct answer: config.local.json in the top folder only

A leading slash anchors the pattern to the folder containing the .gitignore.

Can you get the rest right without peeking?

Take the timed Quiz: Git Config, .gitignore and Hooks quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →