I am trying to push my eclipse maven project to my GitHub repository but the folder structure it is mapping is wrong.
My Maven Project is named DocOcr and i am trying to push it to DocOcr repository on GitHub using Egit in Eclipse. Although it is copying files but its creating one more folder under gitub DocOcr repo named DocOcr and copying all files under it.
Now my pom.xml and src are getting copied to GitHub as {myusername}/DocOcr/DocOcr
i want my pom.xml and src to get copied to {myusername}/DocOcr/.
Can someone please help ?
Double-check where your .git
is located locally: it should be in the same folder as where your pom.xml
is.
If it is not, backup that .git
(in case you have done multiple commit), and see if you can initialize a new one where your pom.xml is, and import it: re-share your project as described in "How make Eclipse/EGit recognize existing repository information after update?".
Or, as described in "When I commit a project an extra project dir is created", create the Git repo with the option "Use or create repository in parent folder of project" enabled, at the very top of the "Configure Git Repository" dialog (Team -> Share Project... -> Git)
Which is exactly what I meant by "it should be in the same folder as where your pom.xml
is."