Skip to content

Files mentioned in .gitignore are not getting ignored #4694

Closed

Description

@mercedesyenzzz

For some reason glob does not ignore files mentioned in my .gitignore (v 1.0.45 on MacOS).

I am running open code from the root of my repository. In that directory I have a .gitignore with the following section:

# Terraform files
*.tfstate
*.tfstate.backup
.terraform/
*.tfvars
Is there any tfvar file in this repository ?
username (4:44:18 PM)
✱ Glob "**/*.tfvars" (2 matches)
Yes, there are two .tfvars files in this repository:
1. /infra/terraform/environments/netbird/terraform.tfvars
2. /infra/terraform/environments/azure/terraform.tfvars

Wondering how that's possible, because you have this mentioned in your docs:

Internally, tools like grep, glob, and list use [ripgrep](https://github.com/BurntSushi/ripgrep) under the hood. By default, ripgrep respects .gitignore patterns, which means files and directories listed in your .gitignore will be excluded from searches and listings.

Still I like opencode a lot, keep up the good work :)

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 24, 2025
  2. github-actions commented on Nov 24, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. self-assigned this
    on Nov 24, 2025
  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions