Skip to content

Commit adc85a7

Browse files
alejandro5042dscho
authored andcommitted
Document how $HOME is set on Windows
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 <[email protected]>
1 parent 69d6c8d commit adc85a7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/git.txt

+8
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,14 @@ their values the same way as Boolean valued configuration variables, e.g.
477477

478478
Here are the variables:
479479

480+
System
481+
~~~~~~
482+
`HOME`::
483+
Specifies the path to the user's home directory. On Windows, if
484+
unset, Git will set a process environment variable equal to:
485+
`$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
486+
otherwise `$USERPROFILE` if `$USERPROFILE` exists.
487+
480488
The Git Repository
481489
~~~~~~~~~~~~~~~~~~
482490
These environment variables apply to 'all' core Git commands. Nb: it

0 commit comments

Comments
 (0)