Why is this file ignored?

3.5. Why is this file ignored?#

git check-ignore -v logs/debug.log
# .gitignore:3:*.log    logs/debug.log

Read the deciding rule: source file → line → pattern.

A reported ! pattern is an exception—not an exclusion.