Skip to content

Commit 994afdc

Browse files
asheidukdscho
authored andcommitted
Improve documentation for C:\ProgramData\Git\config
Move the description for the additional Git for Windows configuration file into the right place, so that the following descriptions of the read priority also covers this file correctly. Also make it clear, what file `git config --system` selects. Signed-off-by: Andreas Heiduk <[email protected]>
1 parent 745715d commit 994afdc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Documentation/git-config.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,16 @@ FILES
235235
If not set explicitly with `--file`, there are four files where
236236
'git config' will search for configuration options:
237237

238+
$PROGRAMDATA/Git/config::
239+
(Windows-only) System-wide configuration file shared with other Git
240+
implementations. Typically `$PROGRAMDATA` points to `C:\ProgramData`.
241+
238242
$(prefix)/etc/gitconfig::
239243
System-wide configuration file.
244+
(Windows-only) This file contains only the settings which are
245+
specific for this installation of Git for Windows and which should
246+
not be shared with other Git implementations like JGit, libgit2.
247+
`--system` will select this file.
240248

241249
$XDG_CONFIG_HOME/git/config::
242250
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
@@ -253,13 +261,6 @@ $XDG_CONFIG_HOME/git/config::
253261
$GIT_DIR/config::
254262
Repository specific configuration file.
255263

256-
On Windows, as there is no central `/etc/` directory, there is yet another
257-
config file (located at `$PROGRAMDATA/Git/config`), intended to contain
258-
settings for *all* Git-related software running on the machine. Consequently,
259-
this config file takes an even lower precedence than the
260-
`$(prefix)/etc/gitconfig` file. Typically `$PROGRAMDATA` points to
261-
`C:\ProgramData`.
262-
263264
If no further options are given, all reading options will read all of these
264265
files that are available. If the global or the system-wide configuration
265266
file are not available they will be ignored. If the repository configuration

0 commit comments

Comments
 (0)