Machine-local files: use .git/info/exclude, not .gitignore
@devsingh05▲ 13 net votes
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.