When we use IntelliJ IDEA, we often encounter this situation, namely:
After checking out the project from SVN and opening the project for the first time with IDEA, the following selection box will pop up in IDEA:
As shown in the above image, let's choose whether to add the XXX.iml file to the SVN version. Here, the only thing we are a little confused about is what the hell is the XXX.iml file? In the project, there was no such file originally!
In fact, the XXX.iml file is a configuration file that IDEA automatically generates for the project that we open (for the first time). For example, our project is called accounting-hessian, then IDEA automatically produces a configuration file called accounting-hessian.iml for our project. Whether we choose No or Yes, IDEA will automatically add this configuration file to the project. The difference between the two is: if we choose No, then when we submit code to SVN, IDEA will automatically ignore this file when retrieving project version changes; if we choose Yes, IDEA will add it to the project version changes when we submit code to SVN.
Similarly, when we create a new file in the project, the IDEA will also pop up the selection box:
As shown in the figure above, IDEA gives the same prompt when we create a Java class called IdeaTest. Of course, the premise is that we did not choose Remember, don't ask again. If this content is checked, no prompt will be given, and we will default to our choice at that time.
Finally, we try to submit the code to test the performance of IDEA:
As shown in the figure above, when we select No for the first pop-up box and Yes for the second pop-up box, when submitting the code, IDEA ignores the automatically created XXX.iml file and includes the IdeaTest we created into the project version change. In addition, if you observe New:1 Unversioned: 0 of 174 in the lower right corner, we can also see the search results of IDEA, only one New is displayed, that is, a new file is created.
Warm reminder: For the XXX.iml configuration file automatically generated by IDEA, it is strongly recommended not to submit it to SVN with the code!
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.