Prevent IntelliJ from adding iml files

前端 未结 7 876
盖世英雄少女心
盖世英雄少女心 2021-01-01 09:39

I\'m working with Maven pom files, and I don\'t wish to source control iml files. When I open a project, IntelliJ seems to add some of the iml files it creates to the SVN so

相关标签:
7条回答
  • 2021-01-01 10:00

    In case somebody else stumbles onto this issue, the best luck I've had is
    Settings > Version Control > Ignored Files
    Add "Ignore all Files Matching"s for:
    *.idea
    *.iml

    Not sure which version of IDEA rolled out this functionality, and this question is somewhat old, so it may be moot. Just hope it helps somebody else out who landed here from Google as I did.

    0 讨论(0)
  • 2021-01-01 10:02

    If you want to disable checking in *.iml files across all projects, on the Mac OS X 10.8.x you can go to IntelliJ -> Preferences (Command-,) -> Version Control -> Ignore Files and set it up there. This is better if you are like me who works on many projects and frequently need to create/import new projects, I don't want to have to setup this pref on every individual project.

    0 讨论(0)
  • 2021-01-01 10:06

    You can also choose to not have your .iml file in a versionned directory.

    When you create the module, you can select the module file location. alt text

    Here my iml file will be in /ModuleName.iml but the content will by in /myRoot/

    0 讨论(0)
  • 2021-01-01 10:07

    What worked for me, on my Intellij 2019 (2019.2.4 is my version) is:

    0 讨论(0)
  • 2021-01-01 10:07

    Configure IntelliJ to not add files automatically to subversion.

    In IntelliJ 6, this configuration is on Settings > Version Control > General Settings:


    File Creation/Deletion

    When files are created with IDEA:

    [x] Show options before adding to version control

    0 讨论(0)
  • 2021-01-01 10:15

    The latest version of IntelliJ Community prompts you for the iml file additions separately. If you check the box to avoid being warned in future and choose "no" the first time you are prompted, it will not schedule any further IML files for addition to subversion.

    0 讨论(0)
提交回复
热议问题