Follow simple steps to create a java project from git repository in eclipse :
- Create a git repository
- Now in eclipse , use import wizard , select "Existing Projects in to workspace" and give path to your local git repository where the project files are located
- It will create the project , but it will be a simple project
- Now go to git repository location , there should be .project file which is created by eclipse
- in .project file replace this code
<buildSpec></buildSpec> <natures></natures>to this code :
<buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures>