@@ -71,6 +71,7 @@ codes are:
71
71
72
72
On success, the command returns the exit code 0.
73
73
74
+ [[OPTIONS]]
74
75
OPTIONS
75
76
-------
76
77
@@ -143,7 +144,13 @@ See also <<FILES>>.
143
144
144
145
-f config-file::
145
146
--file config-file::
146
- Use the given config file instead of the one specified by GIT_CONFIG.
147
+ For writing options: write to the specified file rather than the
148
+ repository `.git/config`.
149
+ +
150
+ For reading options: read only from the specified file rather than from all
151
+ available files.
152
+ +
153
+ See also <<FILES>>.
147
154
148
155
--blob blob::
149
156
Similar to `--file` but use the given blob instead of a file. E.g.
@@ -325,21 +332,14 @@ All writing options will per default write to the repository specific
325
332
configuration file. Note that this also affects options like `--replace-all`
326
333
and `--unset`. *'git config' will only ever change one file at a time*.
327
334
328
- You can override these rules either by command-line options or by environment
329
- variables. The `--global`, `--system` and `--worktree` options will limit
330
- the file used to the global, system-wide or per-worktree file respectively.
331
- The `GIT_CONFIG` environment variable has a similar effect, but you
332
- can specify any filename you want.
335
+ You can override these rules using the `--global`, `--system`,
336
+ `--local`, `--worktree`, and `--file` command-line options; see
337
+ <<OPTIONS>> above.
333
338
334
339
335
340
ENVIRONMENT
336
341
-----------
337
342
338
- GIT_CONFIG::
339
- Take the configuration from the given file instead of .git/config.
340
- Using the "--global" option forces this to ~/.gitconfig. Using the
341
- "--system" option forces this to $(prefix)/etc/gitconfig.
342
-
343
343
GIT_CONFIG_GLOBAL::
344
344
GIT_CONFIG_SYSTEM::
345
345
Take the configuration from the given files instead from global or
@@ -367,6 +367,12 @@ This is useful for cases where you want to spawn multiple git commands
367
367
with a common configuration but cannot depend on a configuration file,
368
368
for example when writing scripts.
369
369
370
+ GIT_CONFIG::
371
+ If no `--file` option is provided to `git config`, use the file
372
+ given by `GIT_CONFIG` as if it were provided via `--file`. This
373
+ variable has no effect on other Git commands, and is mostly for
374
+ historical compatibility; there is generally no reason to use it
375
+ instead of the `--file` option.
370
376
371
377
[[EXAMPLES]]
372
378
EXAMPLES
0 commit comments