Spring Initializr has include as well as a default .gitignore file that has been configured to work effectively with the most popular IDEs.