Add to .gitignore: IntelliJ IDEA editor files (*.iml, .idea)

Steps to reproduce

IntelliJ IDEA is a popular Java IDE by JetBrains (see https://www.jetbrains.com/idea). I've been using it for years. Like most IDEs / editors, IDEA will create hidden project files that we want Git to ignore.

Steps to reproduce:
1. Open Matterhorn pom.xml using IntelliJ IDEA. This creates a new project in the IDE
2. You should know have .idea file in base dir and an .iml file in every subproject dir:

3. Run git status and you will see these files as untracked
4. What's worse, in IntelliJ IDEA you will be prompted to add them to the repo. 5. We now run the risk of committing one of these project files to the Git repo

Expected Results:

  • Follow steps 1-2 above

  • Run git status and you will NOT see the .iml files and .idea file listed

  • Open IntelliJ IDEA and you will NOT be prompted to add those files to the repo

Activity

Show:
Fixed and reviewed

Assignee

Greg Logan

Reporter

John Crossman

Severity

Operations