11

I use Eclipse Indigo and Windows 7 and plugin egit/jgit for Eclipse.

How to change user location in egit? I should do it, because it contains special characters, which doesn't understand egit. I want "C:\git\home\.gitconfig" instead "C:\Users\Кирилл\.gitconfig". How can I do it? When I press "Open" nothing happens.

And in the next Tab "Repository setting" I don't change anything too.

Lucky
  • 16,787
  • 19
  • 117
  • 151
Kyrylo Zapylaiev
  • 682
  • 1
  • 8
  • 15
  • oh, I solved this. Just set HOME in Environment variables. Sorry. But I still don't edit tab "Repository setting" and don't delete any repository. – Kyrylo Zapylaiev Aug 08 '11 at 23:54
  • 1
    If you've found a solution, you can write it as an answer and even accept it as _the_ answer. (It just makes it easier to read, than a comment.) Well done on coming back to answer it, though! – Shalom Craimer Dec 21 '11 at 06:06

2 Answers2

28

You need to add an environment variable: This is how i did it on windows 7

  • Click start button.
    1. Right click "Computer"
    2. Click "Properties"
    3. Click "Advanced System Settings"
    4. "Environment variables" in "Advanced" tab.
    5. Click the "New" button to create a new variable under user variables pane.
    6. Enter "HOME" in the name field
    7. Enter "%USERPROFILE%" or some other path in the value field. (HOME should point to your home directory e.g. C:\Users\Tom. Ensure correct case! E.g. C:\users instead of C:\Users may cause problems!)
    8. Click OK, and OK again. You have just added the Home directory on Windows.
Lucky
  • 16,787
  • 19
  • 117
  • 151
Gershon Herczeg
  • 3,016
  • 23
  • 33
  • 1
    @Gershon Herczeg I installed Eclipse in D: on my system should I set HOME as you said or should I set to some thing different like D drive – Registered User Jan 01 '13 at 16:12
  • Where you installed Eclipse does not make a difference, you can set your HOME variable to ane xisting folder, e.g. "C:\Users\Tom" – Zhubarb Feb 19 '13 at 14:14
  • 1
    Uggg. Inherited from the *nix version and convention I assume, but seems silly to force users to keep their git config in their main user folder (this is a comment on egit, not on this answer). – Tom Dec 08 '13 at 22:24
  • I had to restart Eclipse before the settings would take effect. – johnktims Jan 01 '14 at 00:51
  • I had to File->Exit Eclipse as opposed to File->Restart for the environment variable to be reread. – doughgle Mar 20 '15 at 08:55
2

Git reads the XDG_CONFIG_HOME environment variable to find the users git config (see http://git-scm.com/docs/git-config) but unfortunately JGit doesn't look at it.

I've raised a bug here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430194

please log in to the Eclipse Bugzilla and vote for it.

Sam Hasler
  • 12,344
  • 10
  • 72
  • 106