First of all, Settings | Version control | Ignored files are not .gitignore, this is IntelliJ IDEA's own ignore mechanism that works for any version control system.
This mechanism only works to ignore unversioned files. If you have already added your .iml file to the version control, it will not ignore subsequent changes to this file.
source share