Search code examples
giteclipsegithubegit

How to share project to Git repo in Eclipse without the folder with the same name as the project?


In general, the name of a Git repo is the same as the name of project, there will no longer be a folder with the same name inside the repo. This structure is like commons-io.

But when I

  1. create a repo "com.abc.test" in GitHub and create a Java project "com.abc.test" in local
  2. clone the repo from GitHub
  3. share this Java project to repo

The structure looks like this

enter image description here

It's not what I want. What should I do ?


Solution

    1. Create a repo "com.abc.test" in GitHub
    2. Clone the repo from GitHub
    3. Create a Java project "com.abc.test" in local, but do not use the default location. Instead, use the clone's location. Some options will apparently be locked out, but nothing you can't adjust afterward.

    New Java Project wizard, first page with "Use default location" unchecked