git - gitignore a given folder in multiple subfolders
问题描述
In my web project, there are two node applications, each having a separate node_modules folder.
main_folder has a client folder and server folder, which are two separate node apps.
I have created a .gitignore file inside main folder and I wish to ignore node_modules folders in both node apps. How do I do that?
Thanks in advance.
解决方案
Add node_modules/
to .gitignore in main directory.
Each line in .gitignore represents a pattern that will make git ignore specific files and directories. It should cover all subdirectories as well.
推荐阅读
- class - Angular 5 防止向类添加道具
- php - PHP / MySQL / AJAX - 更新多个数据
- html - 如何使用 svg 过滤器在图像过渡中添加更多图像?
- javascript - 渲染组件及其状态
- asp.net-core - 偶尔 System.NotSupportedException:没有数据可用于编码 1252
- dynamics-crm - Microsoft Dynamics 365 (on-premises v8.2) 如何为自定义角色启用 ISH 的子区域按钮?
- sql - 在组合行时按多列分组
- typescript - 错误类型错误:changes.forEach 不是函数
- python - 按列值复制熊猫数据框中的行并添加具有重复索引的新列
- python - python flask从Pycharm运行应用程序时如何从终端访问CLI