Merge branch 'es/worktree-docs'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:29:02 +0000 (13:29 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2018 04:29:02 +0000 (13:29 +0900)
Doc updates.

* es/worktree-docs:
git-worktree.txt: unify command-line prompt in example blocks
git-worktree.txt: recommend 'git worktree remove' over manual deletion

1  2 
Documentation/git-worktree.txt
index e7eb24ab8528e39aa4e0a75f6feaa46d9cfb39fe,70492bf6ca4da291bcee86b91ee7c08d9eb19948..2755ca90e3a457538a2f7a016fbe944b7e51b88b
@@@ -27,11 -27,12 +27,12 @@@ out more than one branch at a time.  Wi
  tree is associated with the repository.  This new working tree is called a
  "linked working tree" as opposed to the "main working tree" prepared by "git
  init" or "git clone".  A repository has one main working tree (if it's not a
- bare repository) and zero or more linked working trees.
+ bare repository) and zero or more linked working trees. When you are done
+ with a linked working tree, remove it with `git worktree remove`.
  
- When you are done with a linked working tree you can simply delete it.
- The working tree's administrative files in the repository (see
"DETAILS" below) will eventually be removed automatically (see
+ If a working tree is deleted without using `git worktree remove`, then
+ its associated administrative files, which reside in the repository
(see "DETAILS" below), will eventually be removed automatically (see
  `gc.worktreePruneExpire` in linkgit:git-config[1]), or you can run
  `git worktree prune` in the main or any linked working tree to
  clean up any stale administrative files.
@@@ -50,11 -51,10 +51,11 @@@ is linked to the current repository, sh
  directory specific files such as HEAD, index, etc. `-` may also be
  specified as `<commit-ish>`; it is synonymous with `@{-1}`.
  +
 -If <commit-ish> is a branch name (call it `<branch>` and is not found,
 +If <commit-ish> is a branch name (call it `<branch>`) and is not found,
  and neither `-b` nor `-B` nor `--detach` are used, but there does
  exist a tracking branch in exactly one remote (call it `<remote>`)
 -with a matching name, treat as equivalent to
 +with a matching name, treat as equivalent to:
 ++
  ------------
  $ git worktree add --track -b <branch> <path> <remote>/<branch>
  ------------
@@@ -106,7 -106,7 +107,7 @@@ OPTION
        By default, `add` refuses to create a new working tree when
        `<commit-ish>` is a branch name and is already checked out by
        another working tree and `remove` refuses to remove an unclean
-       working tree. This option overrides that safeguard.
+       working tree. This option overrides these safeguards.
  
  -b <new-branch>::
  -B <new-branch>::
@@@ -232,7 -232,7 +233,7 @@@ The worktree list command has two outpu
  details on a single line with columns.  For example:
  
  ------------
S git worktree list
$ git worktree list
  /path/to/bare-source            (bare)
  /path/to/linked-worktree        abcd1234 [master]
  /path/to/other-linked-worktree  1234abc  (detached HEAD)
@@@ -247,7 -247,7 +248,7 @@@ if the value is true.  An empty line in
  example:
  
  ------------
S git worktree list --porcelain
$ git worktree list --porcelain
  worktree /path/to/bare-source
  bare
  
@@@ -278,8 -278,7 +279,7 @@@ $ pushd ../tem
  # ... hack hack hack ...
  $ git commit -a -m 'emergency fix for boss'
  $ popd
- $ rm -rf ../temp
- $ git worktree prune
+ $ git worktree remove ../temp
  ------------
  
  BUGS