This is very useful, since scripts know the relative path from the workspace to the git checkout parent.

However, it all breaks if I change the absolute location, for example by "mv parent parent_old". When I start Eclipse pointing to "parent_old", all the projects in the workspace open correctly, but all the projects that were imported from git cannot be opened, since EGit seems to retain the absolute path to the repository.

Is there any way for EGit to use a path relative to the workspace root?

Thanks

]]>Matthew Webber2012-05-14T10:01:10-00:00Re: Is a relative path to git repository possible?https://www.eclipse.org/forums/index.php/mv/msg/351504/872981/#msg_872981
> Currently we clone our git repositories outside the workspace (as recommended), to a special location ${workspace.root}_git. So we have:
>
> /parent
> /workspace
> . metadata
> features/
> feature_project_that_came_from_subversion/
> plugins/
> plugin_project_that_came_from_subversion/
> /workspace_git
> repo1/
> .git
> project11/
> project12/
> repo2/
> .git
> project21/
> project22/
> This is very useful, since scripts know the relative path from the workspace to the git checkout parent.
>
> However, it all breaks if I change the absolute location, for example by "mv parent parent_old". When I start Eclipse pointing to "parent_old", all the projects in the
> workspace open correctly, but all the projects that were imported from git cannot be opened, since EGit seems to retain the absolute path to the repository.
>
> Is there any way for EGit to use a path relative to the workspace root?

Not at the moment. I suggest you disconnect and reconnect.
I thought moving a workspace was not possible. Maybe it was, but now is.

-- robin]]>Robin Rosenberg2012-05-17T08:29:58-00:00Re: Is a relative path to git repository possible?https://www.eclipse.org/forums/index.php/mv/msg/351504/874649/#msg_874649
You can move the workspace, but it looks like EGit projects use an absolute path.]]>Matthew Webber2012-05-21T10:10:31-00:00Re: Is a relative path to git repository possible?https://www.eclipse.org/forums/index.php/mv/msg/351504/1031375/#msg_1031375
so the org.eclipse.egit.core.prefs file looks like this:
GitRepositoriesView.GitDirectories=C\:\\Users\\7student\\Desktop\\git test yard\\repo1\\.git;C\:\\Users\\7student\\Desktop\\git test yard\\asdf\\.git;.\\git\\as
df2\\.git;
RepositorySearchDialogSearchPath=C\:\\Users\\7student\\Desktop\\git test yard
eclipse.preferences.version=1]]>Hunter Morgan2013-04-01T16:44:44-00:00Re: Is a relative path to git repository possible?https://www.eclipse.org/forums/index.php/mv/msg/351504/1031408/#msg_1031408
Hunter Morgan2013-04-01T17:58:53-00:00Re: Is a relative path to git repository possible?https://www.eclipse.org/forums/index.php/mv/msg/351504/1032854/#msg_1032854
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359744 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=358285]]>Stefan Lay2013-04-03T14:14:12-00:00