Merge branch 'gk/tracing-optimization'
[gitweb.git] / Documentation / git-worktree.txt
index e257c19ebed96c3ab4877a752c3545e2d98c5d84..b472acc3567f2cb0ed574a48459adb1c9a6f0334 100644 (file)
@@ -9,7 +9,7 @@ git-worktree - Manage multiple working trees
 SYNOPSIS
 --------
 [verse]
-'git worktree add' [-f] [--detach] [--checkout] [-b <new-branch>] <path> [<branch>]
+'git worktree add' [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>]
 'git worktree list' [--porcelain]
 'git worktree lock' [--reason <string>] <worktree>
 'git worktree prune' [-n] [-v] [--expire <expire>]
@@ -52,7 +52,7 @@ is linked to the current repository, sharing everything except working
 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,
+If `<branch>` is omitted and neither `-b` nor `-B` nor `--detach` used,
 then, as a convenience, a new branch based at HEAD is created automatically,
 as if `-b $(basename <path>)` was specified.
 
@@ -107,6 +107,11 @@ OPTIONS
        such as configuring sparse-checkout. See "Sparse checkout"
        in linkgit:git-read-tree[1].
 
+--lock::
+       Keep the working tree locked after creation. This is the
+       equivalent of `git worktree lock` after `git worktree add`,
+       but without race condition.
+
 -n::
 --dry-run::
        With `prune`, do not remove anything; just report what it would