I saw a lot of examples for .gitignore
files for AndroidStudio, some have .idea
in them, and some don't.
Is there a good reason not to add the entire .idea dir to .gitignore?
If it should not be completely ignored, are there specific files inside .idea (such as .iml) that should be in .gitignore?
You can take a look at this page :
IntelliJ doc about project configuration files
In the "Directory-based format", a particular line is interesting :
The .idea directory contains a set of configuration files (.xml). Each file contains only a portion of configuration data pertaining to a certain functional area which is reflected in the name of a file, for example,
compiler.xml
,encodings.xml
,modules.xml
.Almost all of the files contain information core to the project itself, such as names and locations of its component modules, compiler settings, etc. Thus, these files may (and should) be kept under version control.
However, I properly HATE to make project IDE-dependent (I am currently working on a project made with NetBeans and it hurts to use it with Eclipse which becomes the standard of my company).
So, to answer your question :