Search code examples
intellij-ideaversion-controlignore

Ignore .idea/ files on intellij


I am working with the intellij IDE, my problem is that always are being added some .idea/ folder files in my intellij after compilation. I had excluded these directory sice: Settings > Version Control > Ignored Files:

Ignored files intellij

But it seems it is not working, because I continue seeing these files. I am the only one of my team who has this problem, so it should be an IDE problem.

enter image description here


Solution

  • I'm sure you already know this, but the .idea directory is actually just the IDE settings generated by IntelliJ IDEA. If you're talking about source control, you'll need to add a rule to ignore that folder.

    For git, you'll want a .gitignore file on the project level, and add the following to the file:

    .idea/
    

    If you want to check what is being ignored currently, or add some easy context menus for adding things to your ignore file, install the ".ignore" plugin for IntelliJ-IDEA. This plugin will even let you hide these ignored files, since your IDE will always generate this settings folder in the project directory.