git 如何实现 include 声明?-灵析社区

代码大师

我不希望 git 记录 npz 结尾的文件 所以我在 `.gitignore` 里面添加了 `*.npz` 但是呢,我并不是所有的 npz 都想忽略 我想让 git 只追踪 `testing/std.npz` 如何声明让 git 忽略除了 `testing/std.npz` 之外的所有 npz 文件呢?

阅读量:351

点赞量:9

问AI
CTang
我知道了,可以用感叹号声明 *.npz !testing/std.npz