summaryrefslogtreecommitdiff
path: root/Documentation/git-worktree.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:33 (GMT)
commit6249ce2d1b9b60e7aa630d370e68c87ef6331629 (patch)
treefafbfe509b3e197c0b1681d417d2cd1d220d8b84 /Documentation/git-worktree.txt
parent268e6b8d4d95d9ade705666e152a4c054da32a47 (diff)
parent3ce113827287079dced9aaf9c5d1e1734ecaa265 (diff)
downloadgit-6249ce2d1b9b60e7aa630d370e68c87ef6331629.zip
git-6249ce2d1b9b60e7aa630d370e68c87ef6331629.tar.gz
git-6249ce2d1b9b60e7aa630d370e68c87ef6331629.tar.bz2
Merge branch 'ds/sparse-checkout-requires-per-worktree-config'
"git sparse-checkout" wants to work with per-worktree configuration, but did not work well in a worktree attached to a bare repository. * ds/sparse-checkout-requires-per-worktree-config: config: make git_configset_get_string_tmp() private worktree: copy sparse-checkout patterns and config on add sparse-checkout: set worktree-config correctly config: add repo_config_set_worktree_gently() worktree: create init_worktree_config() Documentation: add extensions.worktreeConfig details
Diffstat (limited to 'Documentation/git-worktree.txt')
-rw-r--r--Documentation/git-worktree.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 9e862fb..b8d53c4 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -286,8 +286,8 @@ CONFIGURATION FILE
------------------
By default, the repository `config` file is shared across all working
trees. If the config variables `core.bare` or `core.worktree` are
-already present in the config file, they will be applied to the main
-working trees only.
+present in the common config file and `extensions.worktreeConfig` is
+disabled, then they will be applied to the main working tree only.
In order to have configuration specific to working trees, you can turn
on the `worktreeConfig` extension, e.g.:
@@ -307,11 +307,16 @@ them to the `config.worktree` of the main working tree. You may also
take this opportunity to review and move other configuration that you
do not want to share to all working trees:
- - `core.worktree` and `core.bare` should never be shared
+ - `core.worktree` should never be shared.
+
+ - `core.bare` should not be shared if the value is `core.bare=true`.
- `core.sparseCheckout` is recommended per working tree, unless you
are sure you always use sparse checkout for all working trees.
+See the documentation of `extensions.worktreeConfig` in
+linkgit:git-config[1] for more details.
+
DETAILS
-------
Each linked working tree has a private sub-directory in the repository's