hawleyw skrev 2011-12-18 16.30:
> So I looked into whether it's possible to have the .git repo not be within your working project, and it is:
> see progit.org blog posting 2010.4.11 on environment variables
> via environment variables (not granular enough for my purposes),
> or via the work-tree / git-dir config options.
---> I have, since writing this post used the command
git init --separate-git-dir=/mydir/git/demo .
to set up a git repo in the /mydir/git/demo/ location with the working dir in the location of the original source code. No trouble from the command line, but not possible from egit wizard
>
> It seems to me that the Egit team could investigate this more carefully and set the default/ recommended wizard actions to put the git repo in ~/git/<projectName>/.git and
> leave the working directory under the workspace. I know that I've seen arguments for keeping all code out of the workspace, but I don't understand that either, so it might
> be nice if the Eclipse docs on workspaces vs projects was updated and also the Egit docs were updated to give more fleshed out explanations for why we shouldn't have code
> in our workspace directories.
>
> The pita for me was that I am working on a yii based web app and spent a bunch of time getting permissions set up properly for the app to run under eclipse, without being
> published to my main webserver and then I put it under git contol with egit, which moved it to ~/git/project/project so it won't run now until I fix up the permissions &
> vhosts again.
To begin with, I agree that having the code in the workspace is perfectly fine. Workspaces are an excellent way
of being able to work on multi-repo projects.
Second you do not have to move the projects out of the workspace. It is an option, though the default. Look at the
sharing dialog and examine the options there.
-- robin
To begin with, I agree that having the code in the workspace is perfectly fine. Workspaces are an excellent way
of being able to work on multi-repo projects.
Did you try the checkbox "Use or create repository in parent folder of project" in the sharing wizard ?
If your project is below the Eclipse workspace this should do the trick.
R Shapiro skrev 2011-12-21 01.18:
> Robin wrote:
>
>
> Quote:
>> To begin with, I agree that having the code in the workspace is perfectly fine. Workspaces are an excellent way
>> of being able to work on multi-repo projects.
>
<snip>
> Similarly sometimes I want a single project to be in more than one Eclipse workspace. What would I do then if the rule is to keep project's repository in the workspace
> directory? I'd have to pick one of them at random.
> Considering what an Eclipse workspace is for and what a Git repository is for it seems clear to me that it's best to avoid any confusion and preserve the distinction in the
> file system when possible. Certainly this should be the default.
I do use multiple tools, but it is *my* problem and recommendations to either way is
my choice and applies to *my* workflow. Recommendations either way has nothing to do
with EGit. It has to do with *your* workflow and only that. EGit should not care
which way *you* do it and be happy with whatever I do.
-- robin
workspace/ workspace/project1 workspace/project2
/workspace /project1 /project2
EGit should not care which way *you* do it and be happy with whatever I do.