Just change% HOME% (or actually $ HOME, since% HOME% is most likely not configured at all).
By default, <git-install-dir>\etc\profile sets $ HOME to% HOMEDRIVE %% HOMEPATH% if they are installed and point to an existing directory, or to% USERPROFILE% otherwise.
So you can edit this file, find the line
HOME="$HOMEDRIVE$HOMEPATH"
and delete it or add # in front of it to use% USERPROFILE% instead.
Alternatively, add a line somewhere after this block, explicitly setting HOME the way you want.
EDIT:
In newer versions of git, this line can no longer be present. I added the following at the very top of my etc\profile (this is very specific and ugly, but it works):
The line export LANG... can be ignored. I have this to get English text in menus and buttons in git gui and gitk, because IMO for translating git commands does not add value, just confusion.
source share