Skip to content

Commit

Permalink
Document how $HOME is set on Windows
Browse files Browse the repository at this point in the history
Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c.

Signed-off-by: Alejandro Barreto <alejandro.barreto@ni.com>
  • Loading branch information
alejandro5042 authored and dscho committed Sep 22, 2022
1 parent 9e4f6ba commit ca7cd83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Documentation/git.txt
Expand Up @@ -460,6 +460,14 @@ Environment Variables
---------------------
Various Git commands use the following environment variables:

System
~~~~~~
`HOME`::
Specifies the path to the user's home directory. On Windows, if
unset, Git will set a process environment variable equal to:
`$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
otherwise `$USERPROFILE` if `$USERPROFILE` exists.

The Git Repository
~~~~~~~~~~~~~~~~~~
These environment variables apply to 'all' core Git commands. Nb: it
Expand Down

0 comments on commit ca7cd83

Please sign in to comment.