Skip to content

Commit 3598f06

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 71ae340 commit 3598f06

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Documentation/git-config.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,16 @@ FILES
263263
If not set explicitly with `--file`, there are four files where
264264
'git config' will search for configuration options:
265265

266+
$PROGRAMDATA/Git/config::
267+
(Windows-only) System-wide configuration file shared with other Git
268+
implementations. Typically `$PROGRAMDATA` points to `C:\ProgramData`.
269+
266270
$(prefix)/etc/gitconfig::
267271
System-wide configuration file.
272+
(Windows-only) This file contains only the settings which are
273+
specific for this installation of Git for Windows and which should
274+
not be shared with other Git implementations like JGit, libgit2.
275+
`--system` will select this file.
268276

269277
$XDG_CONFIG_HOME/git/config::
270278
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
@@ -281,13 +289,6 @@ $XDG_CONFIG_HOME/git/config::
281289
$GIT_DIR/config::
282290
Repository specific configuration file.
283291

284-
On Windows, as there is no central `/etc/` directory, there is yet another
285-
config file (located at `$PROGRAMDATA/Git/config`), intended to contain
286-
settings for *all* Git-related software running on the machine. Consequently,
287-
this config file takes an even lower precedence than the
288-
`$(prefix)/etc/gitconfig` file. Typically `$PROGRAMDATA` points to
289-
`C:\ProgramData`.
290-
291292
If no further options are given, all reading options will read all of these
292293
files that are available. If the global or the system-wide configuration
293294
file are not available they will be ignored. If the repository configuration

0 commit comments

Comments
 (0)