@@ -319,38 +319,38 @@ linkgit:git-config[1] for more details.
319
319
320
320
DETAILS
321
321
-------
322
- Each linked working tree has a private sub-directory in the repository's
322
+ Each linked worktree has a private sub-directory in the repository's
323
323
`$GIT_DIR/worktrees` directory. The private sub-directory's name is usually
324
- the base name of the linked working tree 's path, possibly appended with a
324
+ the base name of the linked worktree 's path, possibly appended with a
325
325
number to make it unique. For example, when `$GIT_DIR=/path/main/.git` the
326
326
command `git worktree add /path/other/test-next next` creates the linked
327
- working tree in `/path/other/test-next` and also creates a
327
+ worktree in `/path/other/test-next` and also creates a
328
328
`$GIT_DIR/worktrees/test-next` directory (or `$GIT_DIR/worktrees/test-next1`
329
329
if `test-next` is already taken).
330
330
331
- Within a linked working tree , `$GIT_DIR` is set to point to this private
331
+ Within a linked worktree , `$GIT_DIR` is set to point to this private
332
332
directory (e.g. `/path/main/.git/worktrees/test-next` in the example) and
333
- `$GIT_COMMON_DIR` is set to point back to the main working tree 's `$GIT_DIR`
333
+ `$GIT_COMMON_DIR` is set to point back to the main worktree 's `$GIT_DIR`
334
334
(e.g. `/path/main/.git`). These settings are made in a `.git` file located at
335
- the top directory of the linked working tree .
335
+ the top directory of the linked worktree .
336
336
337
337
Path resolution via `git rev-parse --git-path` uses either
338
338
`$GIT_DIR` or `$GIT_COMMON_DIR` depending on the path. For example, in the
339
- linked working tree `git rev-parse --git-path HEAD` returns
339
+ linked worktree `git rev-parse --git-path HEAD` returns
340
340
`/path/main/.git/worktrees/test-next/HEAD` (not
341
341
`/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
342
342
rev-parse --git-path refs/heads/master` uses
343
343
`$GIT_COMMON_DIR` and returns `/path/main/.git/refs/heads/master`,
344
- since refs are shared across all working trees , except `refs/bisect` and
344
+ since refs are shared across all worktrees , except `refs/bisect` and
345
345
`refs/worktree`.
346
346
347
347
See linkgit:gitrepository-layout[5] for more information. The rule of
348
348
thumb is do not make any assumption about whether a path belongs to
349
349
`$GIT_DIR` or `$GIT_COMMON_DIR` when you need to directly access something
350
350
inside `$GIT_DIR`. Use `git rev-parse --git-path` to get the final path.
351
351
352
- If you manually move a linked working tree , you need to update the `gitdir` file
353
- in the entry's directory. For example, if a linked working tree is moved
352
+ If you manually move a linked worktree , you need to update the `gitdir` file
353
+ in the entry's directory. For example, if a linked worktree is moved
354
354
to `/newpath/test-next` and its `.git` file points to
355
355
`/path/main/.git/worktrees/test-next`, then update
356
356
`/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
@@ -359,10 +359,10 @@ automatically.
359
359
360
360
To prevent a `$GIT_DIR/worktrees` entry from being pruned (which
361
361
can be useful in some situations, such as when the
362
- entry's working tree is stored on a portable device), use the
362
+ entry's worktree is stored on a portable device), use the
363
363
`git worktree lock` command, which adds a file named
364
364
`locked` to the entry's directory. The file contains the reason in
365
- plain text. For example, if a linked working tree 's `.git` file points
365
+ plain text. For example, if a linked worktree 's `.git` file points
366
366
to `/path/main/.git/worktrees/test-next` then a file named
367
367
`/path/main/.git/worktrees/test-next/locked` will prevent the
368
368
`test-next` entry from being pruned. See
0 commit comments