Why does eGit create an extra directory in the remote repo when I do the first commit/push?

Using eGit... When I perform the initial Commit and Push from Eclipse, a new directory appears in the remote repo. Inside that directory is the root of the project directory. It makes a big mess because when someone clones it (again using eGit) the src folder is munged into a name containing then project folder name, which mucks up the package references in the class files. There is an extra level of directories

1 answer

  • answered 2018-02-13 02:56 nitind

    eGit assumes you don't want an entire git repository for a single workspace project. Doing so would be wasteful and cumbersome for almost anything nontrivial. https://wiki.eclipse.org/EGit/User_Guide#Implications

    You also didn't commit the .classpath file, which would have indicated what the source folders were.