Skip to content

Commit c56a3fe

Browse files
committed
Clarify the location of the Windows-specific ProgramData config
On Windows, there is no (single) `/etc/` directory. To address that, in conjunction with the libgit2 project, Git for Windows introduced yet another level of system-wide config files, located in C:\ProgramData (and the equivalent on Windows XP). Let's spell this out in the documentation. This closes #470 (because there was no reaction in three months in that Pull Request). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5f38630 commit c56a3fe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Documentation/git-config.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ $GIT_DIR/config::
247247
Repository specific configuration file.
248248

249249
On Windows, as there is no central `/etc/` directory, there is yet another
250-
config file, intended to contain settings for *all* Git-related software
251-
running on the machine. Consequently, this config file takes an even lower
252-
precedence than the `$(prefix)/etc/gitconfig` file.
250+
config file (located at `$PROGRAMDATA/Git/config`), intended to contain
251+
settings for *all* Git-related software running on the machine. Consequently,
252+
this config file takes an even lower precedence than the
253+
`$(prefix)/etc/gitconfig` file. Typically `$PROGRAMDATA` points to
254+
`C:\ProgramData` (on Windows XP the equivalent in `$ALLUSERSPROFILE` is used,
255+
i.e. `C:\Documents and Settings\All Users\Application Data\Git\config`).
253256

254257
If no further options are given, all reading options will read all of these
255258
files that are available. If the global or the system-wide configuration

0 commit comments

Comments
 (0)