Merge branch 'ep/http-curl-trace'
[gitweb.git] / Documentation / git-worktree.txt
index 62c76c1c8945512009c6d0ca1179cf71ec50d04e..23d8d2ace04e7867a5b147d3d59c2d1b0d7a36ae 100644 (file)
@@ -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]
 
@@ -48,7 +48,8 @@ add <path> [<branch>]::
 
 Create `<path>` and checkout `<branch>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as HEAD, index, etc.
+directory specific files such as HEAD, index, etc. `-` may also be
+specified as `<branch>`; it is synonymous with `@{-1}`.
 +
 If `<branch>` is omitted and neither `-b` nor `-B` nor `--detached` used,
 then, as a convenience, a new branch based at HEAD is created automatically,
@@ -87,6 +88,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