2

我有带有嵌套子模块的 Git 存储库。它们都有 .git 文件夹。我想在忽略这些 git 文件夹的情况下搜索文件,因为它比没有它们要花费更多的时间。

我曾尝试使用过滤器(Alt+F7),但它不起作用或我做错了。

4

1 回答 1

2

我有同样的问题(https://forum.farmanager.com/viewtopic.php?p=150995)。

逐步解决方案:

  • 使能够[x] Use filter

   ╔══════════════════════════════ Find file ═══════════════════════════════╗
   ║ A file mask or several file masks:                                     ║
   ║ *.*                                                                   ↓║
   ╟────────────────────────────────────────────────────────────────────────╢
   ║ Containing text:                                                       ║
   ║                                                                       ↓║
   ║ Using code page:                                                       ║
   ║ Automatic detection                                                   ↓║
   ╟───────────────────────────────────┬────────────────────────────────────╢
   ║ [ ] Case sensitive                │ [ ] Search in archives             ║
   ║ [ ] Whole words                   │ [x] Search for folders             ║
   ║ [ ] Search for hex                │ [x] Search in symbolic links       ║
   ║ [ ] Not containing                │ [ ] Search in alternate streams    ║
   ╟───────────────────────────────────┴────────────────────────────────────╢
   ║ Select search area:                                                    ║
   ║ From the current folder         ↓   [x] Use filter                     ║
   ╟────────────────────────────────────────────────────────────────────────╢
   ║         { Find } [ Drive ] [ Filter ] [ Advanced ] [ Cancel ]          ║
   ╚════════════════════════════════════════════════════════════════════════╝
  • 添加过滤器(选择Filter,按Insert
    • 为过滤器命名(例如 Git 文件夹)
    • 作为面具集.git
    • 对于属性集[x] Directory

                         ╔════════ Attributes ════════╗
                         ║ [?] Read only              ║
   ╔══════════════════   ║ [?] Archive                ║   ══════════════════╗
   ║ A file mask or se   ║ [?] Hidden                 ║                     ║
                         ║ [?] System                 ║
   ╔══════════════════   ║ [?] Compressed             ║   ══════════════════╗
   ║ Name: Git folder    ║ [?] Encrypted              ║                    ↓║
   ╟──────────────────   ║ [?] Not indexed            ║   ──────────────────╢
   ║ [x] Mask: .git      ║ [x] Directory              ║                    ↓║
   ╟──────────────────   ║ [?] Sparse                 ║   ──────────────────╢
   ║ [ ] Size:           ║ [?] Temporary              ║           [ Blank ] ║
   ║   >=                ║ [?] Offline                ║   00:00:00,000+0000 ║
   ║   <=                ║ [?] Reparse point          ║   00:00:00,000+0000 ║
   ╟──────────────────   ║ [?] Virtual                ║   ──────────────────╢
   ║ [x] Attributes [    ║ [?] Integrity stream       ║    one hardlink     ║
   ╟──────────────────   ║ [?] No scrub data          ║   ──────────────────╢
   ║                     ║ [?] Pinned                 ║                     ║
   ╚══════════════════   ║ [?] Unpinned               ║   ══════════════════╝
                         ║ [?] Recall on open         ║
   ║         { Find }    ║ [?] Recall on data access  ║   Cancel ]          ║
   ╚══════════════════   ║ [?] Strictly sequential    ║   ══════════════════╝
                         ╟────────────────────────────╢
                         ║     { OK } [ Cancel ]      ║
                         ╚════════════════════════════╝
  • 点击{ OK }创建过滤器
  • 确保选择了过滤器并按下-以使用过滤器排除与过滤器匹配的文件/目录。A-出现在过滤器名称之前。(F1如果您需要额外的信息)

  ╔═══════════════════════ Filters menu ═══════════════════════╗
  ║- Git folder            │ +D          ... │ .git            ║
  ╟────────────────────────┼─────────────────┼─────────────────╢
  ║  0. Folders            │ +D          ... │                 ║
  ╚═ +,-,Space,I,X,BS,Shift+BS,Ins,Del,F4,F5,Ctrl+Up,Ctrl+Dn ══╝
  • 测试新过滤器
  • 确保保存配置(Shift+ F9

链接帖子中叶戈尔的过滤器:

╔═══════════════════════════════════ Filters menu ════════════════════════════════════╗
║- Visual Studio Build F │ ..............D+.............. ... │ obj,bin               ║
║  Temporary Files       │ ..............D-.............. ... │ <bak>                 ║
║- NuGet and NodeJs Pack │ ..............D+.............. ... │ packages,node_modules ║
║- Source Repositories   │ ..............D+.............. ... │ .svn,.hg,.git         ║
╟────────────────────────┼────────────────────────────────────┼───────────────────────╢
║  0. Folders            │ ..............D+.............. ... │                       ║
║  1. Panel file type    │ ..............D-.............. ... │ *.                    ║
║  2. Panel file type    │ ..............D-.............. ... │ *.7z                  ║
║  3. Panel file type    │ ..............D-.............. ... │ *.jpg                 ║
║  4. Panel file type    │ ..............D-.............. ... │ *.mp4                 ║
║  5. Panel file type    │ ..............D-.............. ... │ *.pdf                 ║
║  6. Panel file type    │ ..............D-.............. ... │ *.xlsx                ║
║  7. Panel file type    │ ..............D-.............. ... │ *.zip                 ║
╚══════════════ +,-,Space,I,X,BS,Shift+BS,Ins,Del,F4,F5,Ctrl+Up,Ctrl+Dn ══════════════╝
于 2021-12-10T09:29:24.670 回答