When I take a project, an additional dir project is created

I submit the project to github using these steps :

Right-click your project, select โ†’ Share project โ†’ Git. Select the proposed line and click "Create Repository". Press finish.

Right-click on your project and select "Team" โ†’ "Push". a dialog box appears. Save the following data. Adjust the brightness so that you use your user name and your project name.

But when I view my project on github, this is my project structure: myproject -> myproject -> src

When will it be: myproject โ†’ src

This way, an additional layer is created on github with the name of the project. Am I doing the project right?

When trying to share a project with "Use or create a repository in the parent folder of the project" the project path is included "c: \ homedir \ git \ egit-test1 \ egit-test1" If this is not so ", c: \ homedir \ git \ egit-test1 \ "?

Attached screenshot: enter image description here

+7
source share
1 answer

If you do not need an additional directory level in the git repository, you need to enable the option โ€œUse or create a repository in the projectโ€™s parent folderโ€ at the very top of the โ€œConfiguring the git repository dialog (Team โ†’ Share Project ... โ†’ Git).

However, this will create a repository directly in your workspace, and not in the default repository folder, which is not recommended. But you can move the project to the right place and re-import it into the workspace in the second step.

create repository in parent folder of project

Another option is to first create a repository on github. After that, you can clone the github repository and move your code into it.

+6
source

All Articles