Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indecision on which files to upload on GitHub

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?

like image 867
Jack Avatar asked Oct 02 '14 12:10

Jack


2 Answers

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.

like image 136
Juned Ahsan Avatar answered Oct 21 '22 00:10

Juned Ahsan


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/ 
like image 45
Katerina A. Avatar answered Oct 21 '22 00:10

Katerina A.