When working with Maven projects using IDEs such as Eclipse or IntelliJ, you will find that there are many files or folders created, for each individual IDE. In essence, the Maven project does not use these files, so we need to ignore them when pushing the code to version control systems like Git,…
For example, when you create a new Maven project in Eclipse, the project folder will have the following folders and files:
Maven project only needs src folder and pom.xml file!
In addition to the target directory used by Maven to build source code, the remaining files such as .classpath, .project or .settings folder are files and folders of Eclipse IDE. We don’t need to push them to the version control system. Please ignore, Git ignore for example!
For this same project, if you open it with IntelliJ IDE, you will see the following .idea folder:
This directory is also not necessary, so you should also Git ignore!