Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Gitignore RevealNew to Visual Studio Code? Get it now.
Gitignore Reveal

Gitignore Reveal

Fleur Revered

|
1 install
| (0) | Free
Selectively reveal gitignored files in the Explorer — hide files based on .gitignore while keeping specific patterns visible via whitelist or comment markers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gitignore Reveal

Selectively reveal gitignored files in the VS Code Explorer.

VS Code's built-in explorer.excludeGitIgnore hides all gitignored files with no exceptions. This extension replaces that with fine-grained control — hide files based on .gitignore while keeping the ones you need visible.


Features

Feature Description
Automatic .gitignore sync Parses .gitignore and applies patterns to files.exclude automatically.
Whitelist patterns Specify patterns to keep visible even though they are in .gitignore.
Comment markers Add #@show in .gitignore to whitelist patterns without editing settings.
Block markers Use #@show-start / #@show-end to whitelist multiple patterns at once.
Hide .gitignore itself Optionally hide the .gitignore file from the Explorer tree.
Open .gitignore Quickly open .gitignore via command — with picker for multi-root workspaces.
Multi-root workspace Works across all workspace folders independently.

Quick Start

  1. Install the extension.
  2. When prompted, allow the extension to disable explorer.excludeGitIgnore (they overlap).
  3. The extension automatically syncs .gitignore patterns to files.exclude.
  4. To reveal specific files, use any of the methods below.

Usage

Method 1: Whitelist in Settings

Add patterns to the whitelist in Workspace Settings. You can paste patterns directly from .gitignore:

{
  "gitignoreWhitelist.whitelist": [
    "sim/result/*.log",    // exact .gitignore pattern
    "sim/debug.*"          // another exact pattern
  ]
}

Method 2: Comment Markers in .gitignore

Add #@show above a pattern in .gitignore to reveal it — no settings editing needed:

sim/*.log

#@show
sim/result/*.log    ← visible in Explorer (marker above)
sim/result/*Log     ← hidden (no marker)

For multiple patterns, use block markers:

#@show-start
sim/novas.conf      ← visible
sim/novas.rc        ← visible
#@show-end
sim/debug.*         ← hidden

Note: Git treats # lines as comments, so markers do not affect git behavior.


Commands

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for:

Command Description
Gitignore Reveal: Sync Explorer Visibility Manually refresh the Explorer file visibility.
Gitignore Reveal: Remove All Managed Excludes Remove all files.exclude entries managed by this extension.
Gitignore Reveal: Open .gitignore Open .gitignore — shows a picker if multiple exist.

Settings

All settings are workspace-scoped (not available in User settings).

Setting Type Default Description
gitignoreWhitelist.whitelist string[] [] Patterns to keep visible. Paste from .gitignore or use regex.
gitignoreWhitelist.useRegex boolean true Also match whitelist entries as regular expressions.
gitignoreWhitelist.autoSync boolean true Auto-refresh when .gitignore changes.
gitignoreWhitelist.hideGitignoreFile boolean false Hide .gitignore itself in the Explorer.
gitignoreWhitelist.inlineMarker string @show Comment marker keyword for in-file whitelisting.

How It Works

  1. Reads .gitignore from each workspace folder.
  2. Converts patterns to files.exclude entries.
  3. Skips patterns that match the whitelist or have a comment marker.
  4. Updates files.exclude in workspace settings.

This replaces explorer.excludeGitIgnore — that setting should be disabled when using this extension.


Installation

From .vsix file

code --install-extension gitignore-reveal-1.0.0.vsix

From source

cd gitignore-reveal
npm install
npm run compile
npm run package
code --install-extension gitignore-reveal-1.0.0.vsix

Development

  1. Open this folder in VS Code.
  2. Press F5 to launch the Extension Development Host.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft