想要达到 upload 文件夹下忽略所有文件跟踪,但不忽略 index.html ,单规则
在.gitignore 文件里设置如下
uploads/*
uploads/!index.html
但不起作用, index.html 也被忽略了,不跟踪了。 请问是这个语法有问题吗?
Git 版本 2.6.3
1
Valyrian 2016 年 6 月 30 日 via iPad !uploads/index.html
|
3
kevinzhwl 2016 年 6 月 30 日 via iPhone
git add -f uploads/index.html
一次即可 |