使用.gitignore忽略文件夹?

时间:2012-06-29 10:01:17

标签: git directory gitignore

  

可能重复:
  Ignoring directories in Git repos on Windows

我有几个文件夹,缓存分散在整个webapp中。

我正在跟Git跟踪项目。

我已将空的index.html文件添加到每个缓存文件夹中。

我想忽略cache个文件夹的所有内容,但默认情况下文件夹为空,因此是index.html的原因。

我试过了

*cache/*
!*cache/index.html

但它并没有忽视它们。

0 个答案:

没有答案