Find in Files "files to include" override .gitignore
See original GitHub issueVSCode 1.12: I have a TypeScript project with a src
folder and a .gitignore
file containing this:
/src/**/*.js
If I search for something, it is OK with ‘files to include’ is empty:
but it is not OK if I scope the search:
While I’m searching only in some sup-tree of my project, all .gitignore rules should still be taken into account.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:52
- Comments:22 (8 by maintainers)
Top Results From Across the Web
.gitignore File – How to Ignore Files and Folders in Git
In this article, you will learn what a .gitignore file is, how to create one, and how to use it to ignore files...
Read more >.gitignore file - ignoring files in Git | Atlassian Git Tutorial
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and...
Read more >vscode - how to get file search (not content) to include (git ...
Open visual studio code settings ( cmd + , on Mac or Ctrl + , ), search for the setting: Search: Use Ignore...
Read more >How to Find and Create Git .gitignore File Templates
A Git ignore file is a text tile that sits inside your project directory, and tells Git which files or directories it should...
Read more >How to Use a .gitignore File - Pluralsight
A .gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone wondering about the status of this issue, it looks like the underlying ripgrep issue is a bit stale. In the meantime, I found a workaround that works for me to exclude irrelevant files from search in my multi-root workspace.
My workaround is adding this to my workspace settings.json:
It’s not perfect, and doesn’t take into account any
.gitignore
files, but excluding those common patterns works well enough for me to find the files I’m looking for without sifting through loads of irrelevant results.Could we prioritize this issue? Because it definitely blocks effective development. For example, I’m having an error from an module that I installed. I have to disable then enable ignore file search again and again. Evetytime I need to search on node modules folder its so annoying. And I believe most people though that the thing what they are searching doesn’t exists on node modules folder, which can lead to many hours of frustration and waste of time for each developer.
Thank you