Skip to content

glob cannot see git-ignored files #2084

@andrewDoing

Description

@andrewDoing

Describe the bug

In github/copilot-cli, glob appears unable to match files excluded by .gitignore. That makes it hard to inspect intentionally ignored but still important paths—such as generated artifacts, local config, or harness outputs—even when the user explicitly targets those paths.

Affected version

Not provided.

Steps to reproduce the behavior

  1. Create or use a repository with ignored files, for example:
    • .gitignore contains dist/ or *.local
    • files like dist/output.txt or settings.local exist
  2. Start copilot in that repository.
  3. Ask it to inspect or glob an ignored path explicitly, such as dist/** or *.local.
  4. Observe that the ignored files are not matched / not visible.

Expected behavior

If the user explicitly targets an ignored path, glob should either:

  • include those files, or
  • clearly explain that ignored files are excluded.

Ideally there would be an opt-in way to include ignored files when needed.

Additional context

This limitation makes it harder to work with ignored-but-important files during troubleshooting and local workflows. If this behavior is intentional, it would help to document it clearly.

Related: #1981

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions