summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorRay Zhang <zhanglei002@gmail.com>2016-03-29 10:11:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-29 18:12:36 (GMT)
commitef2a0ac9a00c5d82f1fbbef8304c662ff60e4235 (patch)
tree214728c298d16cd1e4c00c27dde514d9bb86fd5d /Documentation
parent56331f8727b0c2e7dc713b728eaf1e5843422cb7 (diff)
downloadgit-ef2a0ac9a00c5d82f1fbbef8304c662ff60e4235.zip
git-ef2a0ac9a00c5d82f1fbbef8304c662ff60e4235.tar.gz
git-ef2a0ac9a00c5d82f1fbbef8304c662ff60e4235.tar.bz2
worktree: add: introduce --checkout option
By adding this option which defaults to true, we can use the corresponding --no-checkout to make some customizations before the checkout, like sparse checkout, etc. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Ray Zhang <zhanglei002@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-worktree.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 62c76c1..c622345 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -9,7 +9,7 @@ git-worktree - Manage multiple working trees
SYNOPSIS
--------
[verse]
-'git worktree add' [-f] [--detach] [-b <new-branch>] <path> [<branch>]
+'git worktree add' [-f] [--detach] [--checkout] [-b <new-branch>] <path> [<branch>]
'git worktree prune' [-n] [-v] [--expire <expire>]
'git worktree list' [--porcelain]
@@ -87,6 +87,12 @@ OPTIONS
With `add`, detach HEAD in the new working tree. See "DETACHED HEAD"
in linkgit:git-checkout[1].
+--[no-]checkout::
+ By default, `add` checks out `<branch>`, however, `--no-checkout` can
+ be used to suppress checkout in order to make customizations,
+ such as configuring sparse-checkout. See "Sparse checkout"
+ in linkgit:git-read-tree[1].
+
-n::
--dry-run::
With `prune`, do not remove anything; just report what it would