Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why .iml files should be added to gitignore? What should be placed in gitignore in common case?

Primary question is, why should I add IDEAs *.iml files to gitignore? If then I get repo without .iml file, I will forced to create new project and manualy add my files. Am I wrong about it?

Actualy, my question is slightly wider. Where can I found more information about what should I do for different languages and IDE's. Maybe there are some general rules when creating new repository for first time used language?

like image 667
QuestionAndAnswer Avatar asked Jun 05 '15 19:06

QuestionAndAnswer


People also ask

Do I need to commit .IML file?

So now in 2016 the the answer would be "No, its not mandatory to save . iml files in Version Control System." Personally, I've found that Android Studio is constantly making minor rearrangements and alterations to the . iml files, so maintaining them in version control is a hassle.

What is the use of .IML file?

IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.


1 Answers

why should I add IDEAs *.iml files to gitignore?

These files get changed all the time when it has nothing to do with the code. If you are not careful you will always be merging this file with every check in with other developers.

If then I get repo without .iml file, I will forced to create new project and manualy add my files. Am I wrong about it?

Not if you use a build tool like maven, gradle or ant. These are better options and work outside IntelliJ.

Where can I found more information about what should I do for different languages and IDE's.

Use Google or if you have a specific question, Stack Overflow.

Maybe there are some general rules when creating new repository for first time used language?

There are a lot of standards, take your pick. I suggest you have a look at how projects which are similar to yours have been setup.

like image 79
Peter Lawrey Avatar answered Sep 21 '22 14:09

Peter Lawrey