Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
2  
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
    
As it's now got an accepted answer there's no point in migrating it. –  ChrisF Feb 21 '11 at 20:28

2 Answers 2

up vote 1 down vote accepted

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 ...)

share|improve this answer
    
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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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