I am having issues with the .iml files generated by Android Studio. On a Gradle sync, they are regenerated meaning I then have to do a commit even if nothing has changed. I just want to make these files untracked.
I have tried the following things.
- Added
*.iml
to my project's.gitignore
file as well as each module's.gitignore
. I have tried both*.iml
and**/*.iml
- Used
git rm --cached app/app.iml
when they appear in the staged files list. Even after doing this and committing it, they appear as staged again later on. - As suggested here I added it to the Ignored Files in Settings under version control