Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to checkout the same projects into diffrent workspaces?
How to checkout the same projects into diffrent workspaces? [message #870651] Wed, 09 May 2012 08:39 Go to next message
techteam is currently offline techteamFriend
Messages: 55
Registered: September 2010
I'm new on git and worked only with csv and svn until now.
(For these I use Eclipse 3.7.2 with Egit 1.3)

I tried now to work with git/egit and came up with some comprehension

If I see it right, per default git-checked-out-projects are only located
inside the "repository folder" - can I change this, so that if have a
checked out project located inside my workspace folder?

In addition of that, I have diffrent projects (plugins), which I want
use inside diffrent workspaces.

At the moment I define inside these workspaces the same directory as
"git repository folder".

At "workspace A" I can check out my project from the remote git
repository and can work within.

Now I change to "workspace B" and want use this project too.
(git repository folder is defined as same directory as from
"workspace A")
If I try to import the data from the remote git repository I got an
error of "non emtpy directory". - Yes that's right - I know. ;)

If now I use the local import option, I can checkout the projects form
the reposity folder - but now ther projects seems not under any version
control and inside the team context menu I can only share this project. :(

How can I use the same git repository folder for all workspaces?
Or do have I to define a special repositiory folder for every workspace?

Thanks in advance

Re: How to checkout the same projects into diffrent workspaces? [message #870700 is a reply to message #870651] Wed, 09 May 2012 11:48 Go to previous message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
The contents of an Eclipse workspace directory are used to remember the state of your work between sessions. Project content directories are something else entirely. You invite confusion by keeping project data in a workspace directory, or a workspace directory in project contents. This is particularly true when you want any given project to be part of multiple workspaces. Do yourself a favor and keep them separate, regardless of whatever version control system you're using.

For Egit, there's one additional issue: there are potentially three ways to import Git projects but apparently not all of them work reliably. Two are choices under "File -> Import...", the third uses the Git Repositories view. I always use this third option, as follows:

1) Open the Git Repositories view, or switch to the Git Repository Exploring perspective, which includes the Git Repositories view by default.
2) If you already have an existing local repository, add it to the list using the toolbar item by that name. If you don't have a local clone yet, use the "Clone a Git repository" toolbar item to create one and add it to the list.
3) Run "Import Projects..." from the right-click menu of the newly added entry for the repository.

Previous Topic:Push to upstream without confirmation dialog?
Next Topic:pushing to remote repo fails, authenticity error
Goto Forum:

Current Time: Wed Apr 01 02:32:42 GMT 2020

Powered by FUDForum. Page generated in 0.01847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top