For the last few months my team was struggling with Intelli IDEA project files. The reason? IDEA creates so many project files that it hurts. The question that always around was: “Should I commit this project file to the version control system or not?”(btw, we’re using Git which makes us very happy).
At one point we switched to IDEA’s new project file format that uses .idea folder for settings with hope that we can ignore that folder and all be fine. Nope… it didn’t work as expected. IDEA still was using several files in project root folder. These files change to often! (I really like Eclipse’s approach with using .classpath and .project (that are safe to commit to VCS) in the root folder and everything else in hidden folder that can be ignorred.)
So, today we’ve finally decided to exclude all IDEA project files from the versioning process. We deleted all project files (backed up actually), cleaned up Git index, updated .gitignore then commited… Now all what was needed was to create a new project in IDEA importing existing sources.
Wow… that was refreshing. It turned out that importing a new project in IDEA after project checkout from Git was more comfortable than being distracted by changes in project files reported by Git. When I just think about time lost on checking what changed in the project file and deciding whether to commit… :-(
For those interested, relevant part of .gitignore for IDEA project files looks like this:
.idea *.iws *.ipr *.launch *.tmproj *.iml
P.S. Some may ask why we use IDEA when Eclipse is about the same as good as IDEA but is FREE? Well, I also like Eclipse and used it for years but IDEA simply has much better support for Groovy and Grails.