Skip to content

Commit 9a33abe

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 <alejandro.barreto@ni.com>
1 parent 507f4b0 commit 9a33abe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/git.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,14 @@ Environment Variables
460460
---------------------
461461
Various Git commands use the following environment variables:
462462

463+
System
464+
~~~~~~
465+
`HOME`::
466+
Specifies the path to the user's home directory. On Windows, if
467+
unset, Git will set a process environment variable equal to:
468+
`$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
469+
otherwise `$USERPROFILE` if `$USERPROFILE` exists.
470+
463471
The Git Repository
464472
~~~~~~~~~~~~~~~~~~
465473
These environment variables apply to 'all' core Git commands. Nb: it

0 commit comments

Comments
 (0)