<分区>
我正在为我的 Linux 主目录创建一个 git 存储库。除了我列入白名单的文件/目录外,我想忽略大部分内容。我有这个:
# Ignore everything
*
# But not these files...
!.gitignore
!*/scripts/*
# the above line doesn't work, so this is a test:
!./scripts/*
但是它忽略了我添加到 scripts/
子目录中的文件。我一直在用 -f
添加东西,这是次优的。
这个问题的答案,Git Won't Un-Ignore a Directory ,对我不起作用。
Git 版本 2.1.4。