Exclude git files in "Find Files" tool

10 次查看(过去 30 天)
I frequently use the "Find Files" dialog to help me find where I use various functions in my codebase and numerous other things. Under "Look In", I always select "Current Folder" because I only want to search for things within one of my repos at once, and I never need to search inside builtin matlab functions. The various repos that I use have the code organized in subfolders, so I always have the "Include Subfolders" option checked. However, my repos are also all source controlled with git, so there's always a .git folder included in the "Current Folder". This wastes a lot of time in searches, as Matlab spends loads of time searching inside the object files in the git directory, and the search time only grows as I make more commits and create more git object files. Plus, it always searches in the .git directory first, as I assume it searches in alphabetical order.
All these git files have no extension, so one potential fix I thought of was to exclude files with no extension from the search, but the "Skip file types" option doesn't seem to allow this. Is there a way for me to efficiently search a directory that is version controlled with git, and has subfolders that all need to be searched?

回答(1 个)

Nate Fulbright
Nate Fulbright 2023-3-13
You can use the "Include onnly file type(s):" drop down to limit to specific file types like ".m" or ".mlapp".
This isn't ideal though, because you have to manually change the file type. This is especially annoying if you work with code files, App Designer files, and text/html/markdown files at the same time.
However, the search is much faster.
It would be amazing if MathWorks added an "exclude subfolders" option as well to exclude only specific subfolder. Even a "exclude version control folders" checkbox would be so nice to have.

类别

Help CenterFile Exchange 中查找有关 Source Control Integration 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by