Skip to content

Commit e8ef401

Browse files
jrngitster
authored andcommitted
doc: advertise GIT_CONFIG_NOSYSTEM
On a multiuser system where mortals do not have write access to /etc, the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep getting work done when a syntax error or other problem renders /etc/gitconfig buggy, until the sysadmin sorts the problem out. Noticed while experimenting with teaching git to error out when /etc/gitconfig is unreadable. Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 96b9e0e commit e8ef401

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Documentation/git-config.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ GIT_CONFIG::
240240
Using the "--global" option forces this to ~/.gitconfig. Using the
241241
"--system" option forces this to $(prefix)/etc/gitconfig.
242242

243+
GIT_CONFIG_NOSYSTEM::
244+
Whether to skip reading settings from the system-wide
245+
$(prefix)/etc/gitconfig file. See linkgit:git[1] for details.
246+
243247
See also <<FILES>>.
244248

245249

Documentation/git.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,14 @@ for further details.
771771
and read the password from its STDOUT. See also the 'core.askpass'
772772
option in linkgit:git-config[1].
773773

774+
'GIT_CONFIG_NOSYSTEM'::
775+
Whether to skip reading settings from the system-wide
776+
`$(prefix)/etc/gitconfig` file. This environment variable can
777+
be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
778+
predictable environment for a picky script, or you can set it
779+
temporarily to avoid using a buggy `/etc/gitconfig` file while
780+
waiting for someone with sufficient permissions to fix it.
781+
774782
'GIT_FLUSH'::
775783
If this environment variable is set to "1", then commands such
776784
as 'git blame' (in incremental mode), 'git rev-list', 'git log',

0 commit comments

Comments
 (0)