Filter löschen
Filter löschen

Exclude git files in "Find Files" tool

14 Ansichten (letzte 30 Tage)
Christopher Marry
Christopher Marry am 9 Sep. 2021
Beantwortet: Nate Fulbright am 13 Mär. 2023
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?

Antworten (1)

Nate Fulbright
Nate Fulbright am 13 Mär. 2023
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.


Mehr zu Source Control Integration finden Sie in Help Center und File Exchange





Community Treasure Hunt

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

Start Hunting!

Translated by