Skip to content

home folder can not easily be modified #1925

Closed
@f-steff

Description

@f-steff
  • [X ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.18.0.windows.1
cpu: x86_64
built from commit: cd1a74fc9dc8a07626c216940db9a51f25206e03
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.16299.726]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VIM
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
During the AD login process to my computer, my company forces a so-called homedrive on us by setting three variables at **HKEY_CURRENT_USER\Volatile Environment** :
   HomeDrive=h:
   HomePath=\
   HomeShare=\\server\%username%$
These settings ensures that a drive named h: is mapped to the cloud drive.

This appear to screw up my windows assigned home folder, which is defined in **HKEY_CURRENT_USER\Environment** :
   HomeDrive=c:
   HomePath=\Users\%username%

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash and CMD have been tested.

  • What commands did you run to trigger this issue?

Started Git Bash or Git CMD, using the provided shortcuts at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git (With the --cd-to-home option intact)
Also by using the Win-R key-shortcut, typing in either "C:\Program Files\Git\git-bash.exe" or "C:\Program Files\Git\git-cmd.exe"

  • What did you expect to occur after running these commands?

The shell opening should have it's home folder set to the location set at HKEY_CURRENT_USER\Environment

  • What actually happened instead?

The home folder was set to the location set at HKEY_CURRENT_USER\Volatile Environment

  • What did I try to resolve this issue.

Searching on the web, I found many attempts to resolve this issue, using all kinds of hacks and workarounds, but never found an actual method to properly set the home folder to the location it's actually at.
The best "solution" I found, was to create a new environmental variable at HKEY_CURRENT_USER\Environment named HOME, with the content c:\Users%username% - this solution works ~75% of the times I tried. :-( - If the --cd-to-home option is used, it's guarantied to fail.

  • How would I like it to be solved?

Actively supporting the environmental variables HOME seems like the most flexible solution.
It could be default (during first run) be set to the location specified at HKEY_CURRENT_USER\Environment, unless a location is specified at HKEY_CURRENT_USER\Volatile Environment, in which case it should prevail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions