Exclude Ignored Files in VS Code | Generated by AI

Home 2025.08

You can make “Go to File” (Quick Open, Ctrl + P) include files that live in your .gitignore by tweaking three settings in your settings.json:

  1. Tell search to ignore your .gitignore rules

    "search.useIgnoreFiles": false,      // don’t respect .gitignore
    "search.useGlobalIgnoreFiles": false // don’t respect your global gitignore
    
  2. Ensure your exclusion globs don’t hide those files By default VS Code inherits all the patterns from files.exclude into search.exclude. If you’ve manually excluded .gitignore-dirs there, re-enable them:

    "search.exclude": {
      "**/.git": false,          // do index .git (if you want)
      "**/.gitignore": false     // definitely don’t hide your .gitignore file itself
      // …any other patterns you’d like to override
    }
    
  3. Reload the window After saving your user or workspace settings, run Developer: Reload Window (⇧ ⌘ P → “Reload Window”) so the file-indexer picks up the change.

Now when you hit Ctrl + P you’ll see all files by name—ignored or not. (stackoverflow.com)


Back Donate