Where is the git init for a Java project?

I've created a workspace TestWorkspace

, and there I created the project Testing Project

(now that has a folder .settings

, src

, bin

and .classpath

, .project

). I will add my code to this project and I want to host this project on gitHub. For this I needgit init

Where should I git init

? In the workspace folder TestWorkspace

or in the project folder Testing Project

? What is the ideal way to go further, I won't run into problems?

+3


source to share


1 answer


From the Egit user manual:

http://wiki.eclipse.org/EGit/User_Guide

It's probably a good idea to make the project the root folder of your repository

The reason is that you can never add another project to this repository, since the .project file will occupy the root folder; you can still add projects as subfolders, but this kind of project is known to cause a lot of problems all over the place. To add another project, you will have to move the project to subfolders in the repository and add the second project as another before you can commit this change.



It's not a good idea for a git init

TestWorkspace workspace folder.

It's a good idea to keep your repository outside of the Eclipse workspace.

+1


source







All Articles