Android studio gitignore 不会忽略 .iml

标签 android git gitignore

我补充说:

*.iml 

到我项目中的所有 gitignore 文件。 即使在提交 .gitignore 之后,它们仍在被跟踪。

最佳答案

git 有时会跟踪文件,即使你添加了不应在 .gitignore 中跟踪的文件

在这种情况下,您应该先删除缓存,然后再添加所有缓存。

重要:在此之前,提交或存储您当前的更改

$ git rm -r --cached .
$ git add .
$ git commit -m "file tracking - changed"

关于Android studio gitignore 不会忽略 .iml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29386242/

相关文章:

android - 在 Android 模拟器上复制物理键盘

android - 卸载应用程序后如何从 GCM 注销

git - 允许 node.exe 并忽略所有其他 .exe

git - 如何在 Sourcetree Diff 中显示空白字符

android - android中super.method之前或super.method之后的逻辑是什么?

android - Facebook 三星 S3 权限屏幕

git - 无法解析支持的身份验证方案 : The operation identifier is not valid in GitKraken

git - .gitignore : track a single file in an ignored directory

git - "git stash -A"如何排除.gitignore内容?

git - 如果我在忽略中使用通配符作为文件夹路径,如何在 .gitignore 中执行异常?