Predict Ignored File Status
Predict Output Easy
Question
You add '*.log' to .gitignore and create 'app.log'. What does `git status` show about app.log?
Code
echo "*.log" > .gitignore
echo "data" > app.log
git status
Hint
Ignored files are not shown by default.
Explanation
Because app.log matches the '*.log' pattern in .gitignore, Git ignores it completely. It does not appear in git status output (not as untracked, not as modified). Use git status --ignored to see ignored files. The .gitignore file itself would appear as untracked unless committed.
Related Resources
Related Lessons
Related Cheatsheets
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.