Search code examples
eclipsegitegit

EGit working directory not under the local repository


The working directory should be visible on a WebDAV server and none of the parent folders should contain the repository itself.

I want to separate totally the folder for .git and the working directory (on a different drive, clean from project files and others).

Using Eclipse EGIT, the repository creation allows set of working directory (Target Location) within a path within the repository. No way found to set GIT_DIR or working_directory within Eclipse. Linking not an option (Windows)

The project .location contains the place within the repository (and that is a binary file anyway), so that should be configurable.

Is there any way to move the working directory to a totally different place? Is there a configuration option I have missed? After editing the files, do I really have to push all to the server, then commit to git?


Solution

  • To summarize what has been written in the comments, EGit does not support Git repositories whose work directory is at a different location than the .git directory. I.e. the core.worktree configuration setting is not taken into account.

    See also this open enhancement request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=433451