Why .iml files have to be added to gitignore? What should be put in gitignore in general?

Basic question: why would I add IDIMs * .iml files to gitignore? If after this I get a repo without the .iml file, I will be forced to create a new project and manually add my files. I am wrong?

In fact, my question is somewhat broader. Where can I find more information on what to do for different languages ​​and IDEs. Maybe there are some general rules when creating a new repository for the first language you use?

+3


source to share


1 answer


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

These files change all the time when it has nothing to do with the code. If you're not careful, you will always merge this file with every check with other developers.

If then I get a repo without the .iml file, I will be forced to create a new project and manually add my files. I am wrong?

Not if you are using a build tool like maven, gradle or ant. These are the best options and work outside of IntelliJ.



Where can I find more information on what to do for different languages ​​and IDEs.

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

Perhaps there are some general rules for creating a new repository for the language you are using for the first time?

There are many standards, take your pick. I suggest you take a look at how projects similar to yours have been set up.

+14


source







All Articles