Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Exclude GitignoredNew to Visual Studio Code? Get it now.
Exclude Gitignored

Exclude Gitignored

yyvs

|
1 install
| (0) | Free
Toggle the hiding of gitignored files in the Explorer, and browse the ones that are hidden
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

exclude-gitignored

Toggle the hiding of gitignored files in the Explorer.

vscode hides them itself through explorer.excludeGitIgnore, using git's own ignore rules, but that setting is buried and not something you flip while you work. This extension puts a single toggle on it.

The Explorer view

An "Exclude gitignored" section in the Explorer, next to Outline and Timeline, lists the files that are hidden. excludeGitignored.viewVisibility decides when it is there:

  • auto - while the files are hidden (default)
  • always - either way, so its title bar can turn the hiding on as well
  • off - never

The list keeps itself up to date: it follows the .gitignore files, the setting, and the files appearing and disappearing on disk.

Two layouts, switched from its title bar:

  • a tree, folders expanded, with one button that collapses and expands them all. A folder that only happens to contain hidden files is greyed out, because that folder stays visible in the Explorer, while a folder that is hidden as a whole is not.
  • a flat list of paths, files only, with the directory as a subdued suffix

The layout is kept in excludeGitignored.flatView. The counting is left to the status bar. A last button opens the .gitignore behind it all, asking which one in a workspace that has several - also available as Exclude Gitignored: Open .gitignore from the command palette.

Toggling

Exclude Gitignored: Toggle Gitignored Files from the command palette, ctrl+alt+g (cmd+alt+g on macOS), or the status bar entry:

$(eye-closed) 7 gitignored    the seven are hidden, click to show them
$(eye) 7 gitignored           the seven are shown, click to hide them

Set excludeGitignored.statusBarCounter to false to drop the number, or excludeGitignored.statusBarItem to false to hide the entry altogether.

The count looks at up to 10000 files, beyond that it is shown with a trailing +.

Tests

npm test runs the unit suite. It stubs the vscode API, so it needs no extension host and runs in a few milliseconds. npm run test:integration runs the suite inside vscode itself - from a terminal that vscode's extension host spawned, unset ELECTRON_RUN_AS_NODE first, or the downloaded vscode starts as plain node.

Acknowledgement

Credit goes to vscode-ignore-gitignore, and npxms.hide-gitignored, for inspiration.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft