Android Studio Ubuntu 14.04 上的 .gitignore 不会忽略某些文件。 [尝试了通常的解决方案]

.gitignore for Android Studio on Ubuntu 14.04 not ignoring certain files. [tried the usual solutions]

git 总是为我的 AS 项目显示这些文件。

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
    modified:   .idea/.name
    modified:   .idea/compiler.xml
    deleted:    .idea/encodings.xml
    modified:   .idea/gradle.xml
    modified:   .idea/misc.xml
    modified:   .idea/modules.xml
    deleted:    .idea/scopes/scope_settings.xml
    modified:   .idea/vcs.xml
    deleted:    Pronto.iml
    modified:   app/app.iml
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    ***-****.iml
no changes added to commit (use "git add" and/or "git commit -a")

我已经尝试过像.gitignore这样的方法 使用 git rm 删除缓存。等等

my .gitignore 匹配 link 到点。

求助。谢谢

.gitignore 只忽略未跟踪的文件。由于您的文件已被 git 跟踪,您可以对这些文件调用 git rm --cached 以将它们从 git 索引中删除,但将它们保留在工作树中。