I came across this answer trying to import a Git project, so I will write my solution here.
The workspace directory is the same as the Git's working directory, so I didn't want to move the project folder somewhere else.
If you have a Git project you want to import, but Eclipse can't see it because it has not the .project file in its directory, here's the steps:
- File > New > Java Project: put in the name the name of the project's dir, so as Antimony said, the project will be automatically configured.
- You will see your project in the Project list, but it's not bound to Git yet.
- If it's a maven project, you can convert it to maven project now: right click on the project and select Configure > Convert to Maven project.
- Delete the project (DO NOT SELECT "Delete project from disk")
- Now you can import the project as a Git project from File > Import > Git Project