使用 git rm --cached -r 命令,从版本库中移除

git rm -r --cached *.iml

output

rm 'commons/commons.iml'
rm 'estate-repo.iml'
rm 'service/service.iml'

然后重新提交