Skip to content

[Feature]: Add File Explorer toggle for gitignored files #2021

Description

@leynier

Problem or use case

The File Explorer can surface files ignored by git, but users do not have a quick way to switch between a complete filesystem view and a cleaner repo-focused view.

In large projects, ignored directories such as build outputs, caches, generated files, or dependency folders can add noise when the user wants to focus on source-controlled work. At other times, those ignored files still need to be inspected from the File Explorer.

Proposed solution

Add a File Explorer toolbar toggle that lets users show or hide files ignored by git:

  • Default to showing gitignored files so existing behavior remains unchanged.
  • Only show the toggle for projects that are git repositories, not regular folders.
  • When hidden, filter gitignored files and descendants of gitignored folders out of the File Explorer tree.
  • Persist the preference in app settings.
  • Request ignored paths from git only when the user hides gitignored files.
  • Preserve local, runtime, and SSH-backed worktree support.

Alternatives or additional context

This is separate from the File Explorer collapse/uncollapse work in #2017.

Related context: #1941 added gitignored File Explorer visibility/decoration. This issue is specifically for adding a user-controlled show/hide toggle.

Implementation notes:

  • Use git status --porcelain=v2 --ignored=matching only when the toggle needs ignored-path data.
  • Keep ignored paths separate from normal git status entries so source-control badges remain unchanged.
  • Match ignored descendants by normalized relative paths without confusing sibling prefixes such as dist and dist2.
  • Add regression coverage for git status parsing, local/runtime/SSH propagation, settings persistence, filtering behavior, and toolbar visibility for non-git folders.

Activity

  1. added theissue type on Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions