Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hide Git Ignored FilesNew to Visual Studio Code? Get it now.
Hide Git Ignored Files

Hide Git Ignored Files

Tuomar2

|
1 install
| (0) | Free
Easily toggle showing and hiding gitignored files in the File Explorer via a toolbar button.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hide Files in Explorer VS Code Extension

A lightweight VS Code / Cursor / Antigravity extension that adds a quick toggle button to the File Explorer view toolbar to show and hide gitignored files.

Features

  • 👁️ One-click Toggle: Easily show or hide gitignored files directly from the Explorer view header.
  • 🔄 Persistent State: Uses VS Code's native explorer.excludeGitIgnore configuration, which keeps your preference persistent across reloads.
  • ⚙️ Synchronized State: The toolbar icon dynamically updates when settings are changed elsewhere (e.g., manually in settings.json).
  • 🚀 Default Active: Automatically hides gitignored files by default on first install.

Usage

Once installed, a new button will appear in the top-right toolbar of the File Explorer view (next to the "New File" and "Collapse Folders" buttons):

  • Hide Gitignored Files ($(eye-closed)): Click to hide gitignored files.
  • Show Gitignored Files ($(eye)): Click to show gitignored files.

Development and Testing

To test the extension locally:

  1. Open this project directory in VS Code / Cursor / Antigravity.
  2. Run npm install to install dependencies.
  3. Press F5 (or go to the Debug panel and select Run Extension) to launch an Extension Development Host window.
  4. In the new host window, open a workspace with a .gitignore file and test clicking the toggle button in the Explorer title toolbar.

Available Scripts

  • npm run watch: Bundles the project using esbuild and watches for any changes.
  • npm run compile: Compiles the project using esbuild for production.
  • npm run compile-tests: Type-checks the TypeScript code.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft