Skip to content

Commit a777d4c

Browse files
derrickstoleegitster
authored andcommitted
worktree: use 'worktree' over 'working tree'
It is helpful to distinguish between a 'working tree' and a 'worktree'. A worktree contains a working tree plus additional metadata. This metadata includes per-worktree refs and worktree-specific config. This is the fourth of multiple changes to git-worktree.txt, restricted to the REFS section. This section previously described "per working tree" refs but they are now replaced with "per-worktree" refs, which matches the definition in glossary-content.txt. The first paragraph of this section was also a bit confusing, so it is cleaned up to make it easier to understand. Helped-by: Taylor Blau <[email protected]> Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6036be1 commit a777d4c

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

Documentation/git-worktree.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,24 +256,23 @@ have two worktrees, at `/abc/def/ghi` and `/abc/def/ggg`, then `ghi` or
256256

257257
REFS
258258
----
259-
In multiple working trees, some refs may be shared between all working
260-
trees and some refs are local. One example is `HEAD` which is different for each
261-
working tree. This section is about the sharing rules and how to access
262-
refs of one working tree from another.
263-
264-
In general, all pseudo refs are per working tree and all refs starting
265-
with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
266-
directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
267-
exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
268-
shared.
269-
270-
Refs that are per working tree can still be accessed from another
271-
working tree via two special paths, `main-worktree` and `worktrees`. The
272-
former gives access to per-working tree refs of the main working tree,
273-
while the latter to all linked working trees.
259+
When using multiple worktrees, some refs are shared between all worktrees,
260+
but others are specific to an individual worktree. One example is `HEAD`,
261+
which is different for each worktree. This section is about the sharing
262+
rules and how to access refs of one worktree from another.
263+
264+
In general, all pseudo refs are per-worktree and all refs starting with
265+
`refs/` are shared. Pseudo refs are ones like `HEAD` which are directly
266+
under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are exceptions,
267+
however: refs inside `refs/bisect` and `refs/worktree` are not shared.
268+
269+
Refs that are per-worktree can still be accessed from another worktree via
270+
two special paths, `main-worktree` and `worktrees`. The former gives
271+
access to per-worktree refs of the main worktree, while the latter to all
272+
linked worktrees.
274273

275274
For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
276-
resolve to the same value as the main working tree's `HEAD` and
275+
resolve to the same value as the main worktree's `HEAD` and
277276
`refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
278277
`worktrees/bar/refs/bisect/bad` are the same as
279278
`$GIT_COMMON_DIR/worktrees/foo/HEAD` and

0 commit comments

Comments
 (0)