1

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?

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
  • Plain Git allows specifying a different working directory in its config file (search for `core.worktree` in https://git-scm.com/docs/git-config/). Did you try this setting and see if EGit respects it? – Rüdiger Herrmann Nov 29 '16 at 16:33
  • tested and sounds good, command line OK but in case setting core.worktree in eclipse is set to another folder, adding files is not possible with EGit - it cannot see the files, and from the other project, no access to that git. – Attila Törcsvári Nov 30 '16 at 15:37
  • So it looks as if EGit does not take the `core.worktree` setting into account. You may want to open an enhancement request to see if the EGit maintainers consider adding this feature: https://eclipse.org/egit/support/ – Rüdiger Herrmann Nov 30 '16 at 16:46
  • Further investigation shown that core.worktree is supported by jgit (indeed, testing with settig core.worktree to another host have shown some functionality) but not supported by egit. Tried to send the enhancement request, but I am "NEW" user there, and, as such, considered as a default spam sender by eclipse support... Anyway, a similar bug is communicated under https://bugs.eclipse.org/bugs/show_bug.cgi?id=433451 – Attila Törcsvári Dec 02 '16 at 09:31

1 Answers1

0

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

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79