Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Toggle "Exclude Git Ignore"New to Visual Studio Code? Get it now.
Toggle "Exclude Git Ignore"

Toggle "Exclude Git Ignore"

earshinov

|
171 installs
| (0) | Free
Toggle "Explorer: Exclude Git Ignore" setting globally to show or hide .gitignore'd files on the Explorer panel with a single command
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-toggle-exclude-gitignore

Build Status Coverage Status Visual Studio Marketplace Version

Toggle "Explorer: Exclude Git Ignore" (explorer.excludeGitIgnore) setting globally in user settings.

When explorer.excludeGitIgnore is also defined in workspace settings, it is removed from there for two reasons:

  • this way the workspace setting does not override the global setting set by the extension;
  • user interface settings like this one should better be kept in user settings, not workspace settings, which are often pushed to a source code repository.

Usage

Option 1: Command Palette > Explorer: Toggle Git Ignore

Option 2: Default keyboard shortcut: Ctrl-Alt-E (Windows) / Cmd-Option-E (Mac)

To memorize the shortcut, think of the default shortcut for focusing the Explorer panel: Ctrl-Shift-E / Shift-Cmd-E.

To reassign the shortcut, open keyboard shortcuts and look for "Explorer: Toggle Git Ignore" or earshinov.toggleExcludeGitIgnore.

Comparison to similar extensions

Extension Comment
chrisbibby.hide-git-ignored Toggles explorer.excludeGitIgnore in workspace settings rather than globally.

There is a reported issue filed in November 2023: [Make settings applied globaly · Issue #2 · ChrisBibby/vscode_hide-git-ignored](https://github.com/ChrisBibby/vscode_hide-git-ignored/issues/2)
timgthomas.explorer-gitignore Toggles explorer.excludeGitIgnore in workspace settings rather than globally
balan-jayavictor.GitIgnored No source code available

References

  • [Add a command to hide/show file explorer using gitignore · Issue #152696 · microsoft/vscode](https://github.com/microsoft/vscode/issues/152696)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft