0

I'm not sure I have either my new repo or clone repo workflow, or both, setup correctly. When I create a new project I create a repo on github, can't clone from it as it's empty so I create a new project which goes into my workspace and then the git init runs on the workspace copy. So I end up with everything in workspace\project-name.

However, when I clone from github first I need to clone the repo and this goes into my default git directory (C:\git) as git\cloned-project-name, I then need to import this Git repo as a project into my workspace and I end up with workspace\cloned-project-name effectively duplicating the project folder in the git area.

I've tried to clone to workspace\cloned-project-name but then it asks to import the git project and if I try to use workspace\cloned-project-name again, it errs.

What am I doing wrong? Thanks, Matt.

  • 3
    I can move this to Stack Overflow if you want. It might get a better answer over there. – ChrisF Feb 19 '11 at 10:44
1

you prefer working in the git/cloned-project-name directory, right ? After your start the eclipse, did you use import ? or you did the New Project ?

If you use import and select "Existing XXX projects", e.g. Existing Maven Project. then it does not use workspace as working directory.

If you select "New Project", there is an option "USe default workspace location", just uncheck it :

(Ops i could not post images yet ...)

  • no I'd prefer to work in the workspace, and avoid the git directory altogether. I've taken your solution and applied it to the workspace folder though, all working well now - thanks! – Matty F Feb 20 '11 at 22:25
2

Nope. There's no way to get this to work. You can't use egit to checkout a git project into the workspace and if you check it out elsewhere and try to copy it into the workspace, you will lose your connection to the remote repository. If you want VCS that works, use svn or mercurial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.