Git 忽略随机数字文件夹名称

标签 git

我想忽略一些用随机数字名称甚至 float 生成的文件夹,但我不知道如何查看它们以包含在 .gitignore 文件中

最佳答案

怎么样:

* //Ignore everything

!*[!0-9.]* //Except things with some characters besides numbers (and period, for decimals) in them
!*.*.* //And except things with two periods, since these can't be numbers

请注意,这些是 shell glob 而不是正则表达式。

关于Git 忽略随机数字文件夹名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40616603/

相关文章:

c++ - cmake:在主 cmakelists 中使用之前从 git 检索库

git push 验证失败

git - 一切都是最新的(一切都不是)

git - 防止将来自 master 的文件与 Git merge

git - 取消忽略git中被忽略目录中的文件

git - 如何在 GitHub 上管理存储库

git 告诉我我的文件被更改了,但我看不出有什么不同

git - 在 master 之上的 rebase 整个分支是否与从 rebased 分支中挑选每个提交相同?

git - 如何获取在预接收 Hook 中提交的所有哈希值?

git rebase 一个分支,因为它被创建