← Quiz: Git Config, .gitignore and Hooks: all 10 questions
Quiz: Git Config, .gitignore and Hooks · Question 3 of 10
Your .gitignore contains .env. and then !.env.example. What happens to .env.example?
Your .gitignore contains .env.* and then !.env.example. What happens to .env.example?
- A.It is ignored
- B.It is tracked, because the later ! rule un-ignores it
- C.Git reports an error for conflicting rules
- D.It is deleted
Answer & explanation
Correct answer: It is tracked, because the later ! rule un-ignores it
For .gitignore, the last matching pattern wins.
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 →