Patterns in .git/info/exclude aren't ignored #9256

Open
opened 2026-02-16 18:12:01 -05:00 by yindo · 1 comment
Owner

Originally created by @thetarnav on GitHub (Feb 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Changes to files in ignored by .git/info/exclude show up in the "Modified Files" section, in the sidebar.
Looke like .gitignore is getting used—changes in node_modules are not reported while in .gitignore.
But not .git/info/exclude.
Both of these files are excluding files from git and are respected by tools like ripgrep, so I think that opencode should do the same.

Image
cat .git/info/exclude
opencode.json
.grepai
.vscode/settings.json
.env

OpenCode version

1.1.65

Steps to reproduce

  1. echo "file_to_ignore" >> .git/info/exclude
  2. Modify that file
  3. Prompt opencode with something to trigger file change check

Operating System

Ubuntu 24.04.4 LTS

Originally created by @thetarnav on GitHub (Feb 13, 2026). Originally assigned to: @rekram1-node on GitHub. Changes to files in ignored by `.git/info/exclude` show up in the "Modified Files" section, in the sidebar. Looke like `.gitignore` is getting used—changes in `node_modules` are not reported while in `.gitignore`. But not `.git/info/exclude`. Both of these files are excluding files from git and are respected by tools like ripgrep, so I think that opencode should do the same. <img width="606" height="327" alt="Image" src="https://github.com/user-attachments/assets/18038e32-4c2c-4f41-ae14-f51ecb470afa" /> ```sh cat .git/info/exclude opencode.json .grepai .vscode/settings.json .env ``` ### OpenCode version 1.1.65 ### Steps to reproduce 1. `echo "file_to_ignore" >> .git/info/exclude` 2. Modify that file 3. Prompt opencode with something to trigger file change check ### Operating System Ubuntu 24.04.4 LTS
yindo added the bug label 2026-02-16 18:12:01 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue might be related to #4694, which reports that .gitignore patterns are not being respected by the glob tool. Both issues deal with git exclusion patterns not being properly honored across different parts of OpenCode.

@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue might be related to #4694, which reports that .gitignore patterns are not being respected by the glob tool. Both issues deal with git exclusion patterns not being properly honored across different parts of OpenCode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9256