diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index b472acc356..121895209d 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] [--checkout] [--lock] [-b ] [] +'git worktree add' [-f] [--detach] [--checkout] [--lock] [-b ] [] 'git worktree list' [--porcelain] 'git worktree lock' [--reason ] 'git worktree prune' [-n] [-v] [--expire ] @@ -45,14 +45,14 @@ specifying `--reason` to explain why the working tree is locked. COMMANDS -------- -add []:: +add []:: -Create `` and checkout `` into it. The new working directory +Create `` and checkout `` into it. The new working directory is linked to the current repository, sharing everything except working directory specific files such as HEAD, index, etc. `-` may also be -specified as ``; it is synonymous with `@{-1}`. +specified as ``; it is synonymous with `@{-1}`. + -If `` is omitted and neither `-b` nor `-B` nor `--detach` used, +If `` 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 )` was specified. @@ -84,25 +84,25 @@ OPTIONS -f:: --force:: - By default, `add` refuses to create a new working tree when `` + By default, `add` refuses to create a new working tree when `` is a branch name and is already checked out by another working tree. This option overrides that safeguard. -b :: -B :: With `add`, create a new branch named `` starting at - ``, and check out `` into the new working tree. - If `` is omitted, it defaults to HEAD. + ``, and check out `` into the new working tree. + If `` is omitted, it defaults to HEAD. By default, `-b` refuses to create a new branch if it already exists. `-B` overrides this safeguard, resetting `` to - ``. + ``. --detach:: With `add`, detach HEAD in the new working tree. See "DETACHED HEAD" in linkgit:git-checkout[1]. --[no-]checkout:: - By default, `add` checks out ``, however, `--no-checkout` can + By default, `add` checks out ``, 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].