------------------
The Git configuration file contains a number of variables that affect
-the Git commands' behavior. The `.git/config` file in each repository
-is used to store the configuration for that repository, and
+the Git commands' behavior. The files `.git/config` and optionally
+`config.worktree` (see `extensions.worktreeConfig` below) in each
+repository are used to store the configuration for that repository, and
`$HOME/.gitconfig` is used to store a per-user configuration as
fallback values for the `.git/config` file. The file `/etc/gitconfig`
can be used to store a system-wide default configuration.
include::config/core.txt[]
+extensions.worktreeConfig::
+ If set, by default "git config" reads from both "config" and
+ "config.worktree" file from GIT_DIR in that order. In
+ multiple working directory mode, "config" file is shared while
+ "config.worktree" is per-working directory (i.e., it's in
+ GIT_COMMON_DIR/worktrees/<id>/config.worktree)
+
include::config/add.txt[]
include::config/alias.txt[]
include::config/web.txt[]
-worktree.guessRemote::
- With `add`, if no branch argument, and neither of `-b` nor
- `-B` nor `--detach` are given, the command defaults to
- creating a new branch from HEAD. If `worktree.guessRemote` is
- set to true, `worktree add` tries to find a remote-tracking
- branch whose name uniquely matches the new branch name. If
- such a branch exists, it is checked out and set as "upstream"
- for the new branch. If no such match can be found, it falls
- back to creating a new branch from the current HEAD.
+include::config/worktree.txt[]