我看过了这个答案:Unignore subdirectories of ignored directories in Git
据我所知,我正在做同样的事情,但是 git 拒绝取消忽略我的目录/文件。
这些是我的规则。我试图只获取列出的目录/子目录,但整个 public 目录都没有显示出来。
/public/bootstrap/*
!/public/bootstrap/bower_components/bootstrap/dist/*
!/public/bootstrap/bower_components/bootstrap/dist/**/*
!/public/bootstrap/bower_components/bootstrap/less/variables.less
有什么想法吗?
variables.less
没有被忽略。你确定没有其他的.gitignore
文件会捕捉到它吗? - John Feminella