如何忽略除一个之外的所有dist文件夹?

Mor*_*ert 6 git gitignore

我们的项目中有几个文件夹叫做dist.这些将被git忽略.另一方面手只是把dist/.gitignore文件不使用时,鲍尔有副作用,因为内的DIST文件夹bower_components/都将被忽略为好.

有关如何正确定义规则的任何建议,忽略dist除了内部文件夹之外的文件夹bower_components

Vam*_*ire 16

当然:

dist/
!bower_components/**/dist/
Run Code Online (Sandbox Code Playgroud)