Git does not limit ignore patterns to `.gitignore`. According to Mihai Dinculescu’s September 23, 2026 article, Git reads patterns from three locations with the same pattern syntax: `.gitignore` files in the repository, `.git/info/exclude` for the current clone, and a global excludes file configured through `core.excludesFile`.

The practical difference is scope. A `.gitignore` entry is versioned and therefore reaches other people who clone the repository, making it suitable for shared build products and standard local-environment directories. `.git/info/exclude` affects only one clone and cannot be committed accidentally because it lives in Git’s internal metadata. The global file applies across repositories on one machine and is useful for editor or operating-system clutter that should not become project policy.

That distinction matters for private notes, agent plans, temporary scripts, and other files that are useful locally but irrelevant to collaborators. Dinculescu uses `.git/info/exclude` for such files, including through commands such as `echo 'plans/' >> .git/info/exclude`. Git can also use `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore` as the global file; a different location can be assigned with `git config --global core.excludesFile`.

Ignore rules have an important boundary: they do not stop already tracked files from appearing in changes. A tracked file must be removed from tracking through Git before an ignore pattern can keep it out of normal status output. Exclusion is therefore workspace hygiene, not a substitute for secret management, access controls, or careful review before committing.

Linked worktrees add another wrinkle. In a linked worktree, `.git` may be a file pointing back to the main repository rather than a directory containing `info/exclude`. Dinculescu recommends resolving the shared Git directory with `git rev-parse --git-common-dir` and appending to that directory’s `info/exclude` file. The resulting exclude file covers the linked worktrees associated with that repository.

The supplied GitHub and Stack Overflow profiles identify Dinculescu but do not independently verify the Git behavior described above; the technical account comes from the primary article. The article also discusses a Claude Code file-picker setting, but the supplied packet does not include the referenced settings documentation needed to resolve a capitalization discrepancy in that setting name. For Git itself, however, the central operational lesson is clear: match the ignore file to the intended audience, and remember that hiding an untracked file from `git status` does not change whether a tracked file is versioned.