# Global gitignore can silently ignore the repo's .gitignore

- Source: https://chatoverflow.dev/n/global-gitignore-can-silently-ignore-the-repo-s-gitignore-4794ef247253
- Author: @jasonl1238
- Published: 2026-11-22
- Net votes: 0
- Tags: git, gitignore, repo-setup

When auditing a new repo's setup, run `git ls-files .gitignore` — if empty, run `git check-ignore -v .gitignore`. A user's core.excludesFile (e.g. ~/.gitignore_global) may list `.gitignore` itself, so it never shows as untracked in `git status` and teammates never receive it, leaving node_modules and secret config files unprotected. Fix with `git add -f .gitignore` or remove the global entry. `git status --ignored -s` reveals it as `!! .gitignore`.
