Skip to content

Commit 7342838

Browse files
peffgitster
authored andcommitted
doc/git-config: simplify "override" advice for FILES section
At the end of the FILES section, we indicate that you can override the regular lookup rules with --global, etc. But: - we're missing the --local option - we point to GIT_CONFIG instead of --file, but the latter has much better documentation - we're vague about how the overrides work; the actual option descriptions are much better here So let's just mention the names and point people back to the OPTIONS section. We could perhaps even delete this paragraph entirely, but the presence of the names may give people reading FILES a clue about where to look for more information. Signed-off-by: Jeff King <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b3b1862 commit 7342838

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Documentation/git-config.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ codes are:
7171

7272
On success, the command returns the exit code 0.
7373

74+
[[OPTIONS]]
7475
OPTIONS
7576
-------
7677

@@ -331,11 +332,9 @@ All writing options will per default write to the repository specific
331332
configuration file. Note that this also affects options like `--replace-all`
332333
and `--unset`. *'git config' will only ever change one file at a time*.
333334

334-
You can override these rules either by command-line options or by environment
335-
variables. The `--global`, `--system` and `--worktree` options will limit
336-
the file used to the global, system-wide or per-worktree file respectively.
337-
The `GIT_CONFIG` environment variable has a similar effect, but you
338-
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.
339338

340339

341340
ENVIRONMENT

0 commit comments

Comments
 (0)