Issue
I have created my first git repository and trying to put Spring Boot project.
In the initial git asked to configure ".gitignore" file but i was not sure what files must (supposed to) be in, so i ignored ?
In my first commit-push, i see several files APART FROM pom.xml and some of my .java files like,
.classpath
.gitignore
.project
.settings/org.eclipse.core.resources.prefs
.settings/org.eclipse.jdt.core.prefs
.settings/org.eclipse.m2e.core.prefs
And i am not sure why they are here ?
are they supposed to be there ?
How and where to create .gitignore file ?
Solution
Have a look into https://www.gitignore.io/ There you can create your recommended gitignore based on what you are using.
For Eclipse it says:
# Created by https://www.gitignore.io/api/eclipse
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Eclipse Patch ###
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# End of https://www.gitignore.io/api/eclipse
I had many discussions in teams whether to put IDE based files in GIT or not. Some like it, some say every developer knows how to configure their IDE for the project based on the pom.xml.
My opinion now also is, keep away all IDE files from VCS.
Answered By - miwoe
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)