I have a java project made with Eclipse.
While working on a project, Eclipse creates a bunch of files and folders, what folder and files should I upload on GitHub?
I think that everything under the src
folder should be uploaded. Am I right? Should I commit the .java or the .class files?
source control such as git are used to commit anything that can be called as source and not environment specific. So code, related resources should go but any IDE specific files.
Use gitignore either project specific or globally. The easiest way is to create a .gitignore file in your project root repository. For instance
# Eclipse
.classpath
.project
.settings/
# Intellij
.idea/
*.iml
*.iws
out/
artifacts/
# Mac
.DS_Store
# Maven
log/
target/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With