Skip to content

Commit eea2a86

Browse files
alejandro5042Git for Windows Build Agent
authored and
Git for Windows Build Agent
committed
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 e055dc1 commit eea2a86

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
@@ -394,6 +394,14 @@ Environment Variables
394394
---------------------
395395
Various Git commands use the following environment variables:
396396

397+
System
398+
~~~~~~
399+
`HOME`::
400+
Specifies the path to the user's home directory. On Windows, if
401+
unset, Git will set a process environment variable equal to:
402+
`$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
403+
otherwise `$USERPROFILE` if `$USERPROFILE` exists.
404+
397405
The Git Repository
398406
~~~~~~~~~~~~~~~~~~
399407
These environment variables apply to 'all' core Git commands. Nb: it

0 commit comments

Comments
 (0)