I'm still not getting how IntelliJ deals with various types of directories when using git. I think it should be doing the things just right without any additional settings. In Maven project even so. Shouldn't be the /target folder git ignored by default when usin Maven? I'm pretty happy with commiting .idea folder in my personal project, so I don't need to exclude it from git. However I still need .gitignore in the project's root with just one line - /target/ - which seems strange to me. Do I really need that .gitignore file or is it possible to exclude the /target from git somewhere else in the IntelliJ settings? Or am I missing some pom.xml setting? Thank you.