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

标签 git gitignore

我们的项目中确实有几个名为 dist 的文件夹。这些将被 git 忽略。另一方面,将 dist/ 放入 .gitignore 文件中确实会在使用 Bower 时产生副作用,因为 bower_components/ 中的 dist 文件夹是也被忽略了。

关于如何正确定义规则的任何建议,忽略 dist 文件夹,bower_components 中的文件夹除外?

最佳答案

当然:

dist/
!bower_components/**/dist/

关于git - 如何忽略除一个之外的所有 dist 文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36983932/

相关文章:

git - 如何在进行本地提交后再次取消暂存我的文件?

git - go-git返回的未知状态类型

gitignore 我的 Windows 用户名

Eclipse GIT 重建索引循环加附加 .gitignore

git - 子文件夹中的多个 .gitignore

git - 如何根据某些规则拒绝 git push

bash - 如何处理 git 别名的组合

git - 如何包含父 .gitignore 排除的文件夹?

git 仅添加修改过的更改并忽略未跟踪的文件

windows - Git 服务器端 Hook ,无需 SSH 即可访问执行推送的用户