Interview Prep/Git & GitHub/Commits, branches and tags

How do you debug why a path is ignored?

IntermediateConceptCommits, branches and tags
Answer

Use git check-ignore -v which prints the exact file, line and pattern responsible. Remember precedence: later patterns override earlier ones, ! negates but cannot re-include a file whose parent directory is excluded, and a nested .gitignore applies to its subtree.

git check-ignore -v build/app.js
All Git & GitHub questions Roadmap: Git & GitHub

More on Commits, branches and tags