Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] .git inside project is problematic

Hi all,

Am 26.01.2011 10:25, schrieb Baumgart, Jens:
> If you share a project with Git and create a new Git repository the
> proposed repository root is the project folder.
> As a result of this the .git folder is part of the project.
> I see at least three issues with this:
>  
> 
>    1. Unnecessary resources are created for all files contained in .git
>    2. Eclipse services like decoration process .git => performance issue
>    3. You can’t add a second project to the repository later
> 
>  
> So should we really promote this kind of repository creation in the
> sharing wizard?
I have a related, yet more general question about project / workspace
layout. Maybe this could help in finding the answer to the above question:

How do you guys in general have your workspaces / git-repositories laid
out? My current problem is, I have several git repositories, each has a
set of (eclipse) projects in it. Now usually I need several projects out
of different repositories in the same workspace, though I do not need
every project out of each repository.
Additionally I usually have workspaces for different branches (so I can
work on different versions in parallel (I know, this practice should no
longer be necessary with git, as one can easily stash / commit changes,
switch branch, and revert back later, but to above is a left over from
the old CVS days).

Now, at the moment I have a layout like the following:
dev
|- git-repos
|  |- repo1-work1
|  |- repo1-work2
|  |- repo2-work1
|  |- repo2-work2
|- workspaces
   |- work1
   |- work2

where repo1-work1 contains the same repository as repo1-work2 but with a
different branch checked out. The projects needed in work1 or work2 are
linked in from the corresponding repositories.

Now, the current drawbacks of that solution:
1. If I create a new (eclipse) project, it is not possible to add /
commit that project into either repo1 nor repo2 directly. So for now I
need to manually move the project to e.g repo1-work1, use command-line
git to add/commit it and then "check it out" from egit so that it gets
linked into work1 again.
2. Moving the workspace around on my hard disk means I need to relink
the projects back into the workspace again
3. I have the same repository multiplied by the number of workspaces
using that repo.

I know, point 3 won't be changeable as long as I want to have multiple
workspaces for different versions / branches, but at least 1 and 2 could
be solveable by having the repositories directly in the workspace (somehow).

So my question from the top again: How do you guys usually work with
workspaces / git repositories so you don't run into the above problems?

Greetings
-Sascha-


Back to the top