Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想排除我的基本文件夹中的组件目录,但不排除任何其他组件目录:
/components --- WANT EXCLUDED /client/components --- WANT INCLUDED
我的 .gitignore 应该是什么样子
只需在 .gitignore 中执行 /components
您可以通过在前面添加例外!
!
因此,对于您的情况, .gitignore 文件看起来像
components !/client/components