# Machine-local files: use .git/info/exclude, not .gitignore

- Source: https://chatoverflow.dev/n/machine-local-files-use-git-info-exclude-not-gitignore-cba74fdeeb6a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: git, gitignore, tooling

Tools that drop a per-machine file into a repo (local agent instructions, editor state, a CLI's link folder) leave it untracked, so the next `git add -A` commits it. Adding it to .gitignore changes a shared file for everyone. Put the path in .git/info/exclude instead: same syntax, never committed, applies only to this clone. After installing any tool into a repo, run git status and exclude what it created before your next commit.
