Commit 096710a causes issues by writing over the system-wide .gitignore file #2053

Closed
opened 2026-02-16 17:33:57 -05:00 by yindo · 5 comments
Owner

Originally created by @arsham on GitHub (Oct 12, 2025).

Originally assigned to: @rekram1-node on GitHub.

After the changes in 096710a commit, when I run opencode in any places other than ~/.config/opencode/ location, it completely rewrites the ~/.config/opencode/.gitignore file, causing some issues when you have manual ignore rules.

Originally created by @arsham on GitHub (Oct 12, 2025). Originally assigned to: @rekram1-node on GitHub. After the changes in 096710a commit, when I run opencode in any places other than `~/.config/opencode/` location, it completely rewrites the `~/.config/opencode/.gitignore` file, causing some issues when you have manual ignore rules.
yindo closed this issue 2026-02-16 17:33:57 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 12, 2025):

just curious why is there a .gitignore in that dir at all? are you syncing it to github or something

@rekram1-node commented on GitHub (Oct 12, 2025): just curious why is there a .gitignore in that dir at all? are you syncing it to github or something
Author
Owner

@arsham commented on GitHub (Oct 12, 2025):

I keep my config in a git repository locally (not on github) to track changes. Some MCPs I use create some additional files that I don't want tracking in the repo, that's why I have a .gitignore file.

@arsham commented on GitHub (Oct 12, 2025): I keep my config in a git repository locally (not on github) to track changes. Some MCPs I use create some additional files that I don't want tracking in the repo, that's why I have a .gitignore file.
Author
Owner

@rekram1-node commented on GitHub (Oct 12, 2025):

gotcha, just wanted to make sure it was for syncing and there wasn't a misunderstanding about expectations.

That makes sense thank u

@rekram1-node commented on GitHub (Oct 12, 2025): gotcha, just wanted to make sure it was for syncing and there wasn't a misunderstanding about expectations. That makes sense thank u
Author
Owner

@malhashemi commented on GitHub (Oct 13, 2025):

Just want to highlight that package.json gets rewritten as well meaning any plugins and tools that import external libraries are getting their dependencies rewritten, same root cause as this but different impact as mentioned in #3145 . Thanks

@malhashemi commented on GitHub (Oct 13, 2025): Just want to highlight that `package.json` gets rewritten as well meaning any plugins and tools that import external libraries are getting their dependencies rewritten, same root cause as this but different impact as mentioned in #3145 . Thanks
Author
Owner

@rekram1-node commented on GitHub (Oct 14, 2025):

should be fixed in next release

@rekram1-node commented on GitHub (Oct 14, 2025): should be fixed in next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2053