git忽略不忽略子目录? */labels/*?
我试图忽略某个文件夹名称下的所有文件。但是,我有一个问题,我在树上的不同级别重复两次文件夹名称,这似乎使Gitignore不符合模式吗?
期望的结果: 我要做的是忽略最后一个标签文件夹下的所有文件。
尝试:
- .gitignore适用于其他模式,因此文件本身很好,
- 我尝试了模式:
*/labels/*
**/labels/**
** */labels/**/*
labels/*
labels/**
标签
补充: 这样的目录树:
└── Dir
├── labels
│ └── folder1
│ └── labels
│ ├── file1.txt
│ ├── file2.txt
# Current Git Ignore
*/labels/*
I am trying to ignore all files under a certain folder name. However, I have an issue where I repeat the folder name twice at different levels in the tree and this appears to make gitignore not honor the pattern?
Desired outcome:
What I am looking to do is ignore all file under the last labels folder.
Tried:
- The .gitignore works for other patterns so the file itself is good
- I have tried patterns:
*/labels/*
**/labels/**
**/labels/**/*
labels/*
labels/**
labels
Supplemental:
Directory tree like this:
└── Dir
├── labels
│ └── folder1
│ └── labels
│ ├── file1.txt
│ ├── file2.txt
# Current Git Ignore
*/labels/*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论