Skip to content

Commit 4d9f744

Browse files
committed
Merge branch 'es/worktree-add'
Update to the "linked checkout" in 2.5.0-rc1. Instead of "checkout --to" that does not do what "checkout" normally does, move the functionality to "git worktree add". As this makes the end-user experience of the "worktree add" more or less complete, I am tempted to say we should cook the other topic that removes the internal "new-worktree-mode" hack from "checkout" a bit longer in 'next', and release 2.5 final without that one. * es/worktree-add: Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference worktree: caution that this is still experimental Documentation/git-worktree: fix stale "git checkout --to" references
2 parents 6003e7f + 1eaca7a commit 4d9f744

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Documentation/git-worktree.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DESCRIPTION
1818
Manage multiple worktrees attached to the same repository.
1919

2020
A git repository can support multiple working trees, allowing you to check
21-
out more than one branch at a time. With `git checkout --to` a new working
21+
out more than one branch at a time. With `git worktree add` a new working
2222
tree is associated with the repository. This new working tree is called a
2323
"linked working tree" as opposed to the "main working tree" prepared by "git
2424
init" or "git clone". A repository has one main working tree (if it's not a
@@ -99,7 +99,7 @@ Each linked working tree has a private sub-directory in the repository's
9999
$GIT_DIR/worktrees directory. The private sub-directory's name is usually
100100
the base name of the linked working tree's path, possibly appended with a
101101
number to make it unique. For example, when `$GIT_DIR=/path/main/.git` the
102-
command `git checkout --to /path/other/test-next next` creates the linked
102+
command `git worktree add /path/other/test-next next` creates the linked
103103
working tree in `/path/other/test-next` and also creates a
104104
`$GIT_DIR/worktrees/test-next` directory (or `$GIT_DIR/worktrees/test-next1`
105105
if `test-next` is already taken).
@@ -157,8 +157,9 @@ $ git worktree prune
157157

158158
BUGS
159159
----
160-
Multiple checkout support for submodules is incomplete. It is NOT
161-
recommended to make multiple checkouts of a superproject.
160+
Multiple checkout in general is still experimental, and the support
161+
for submodules is incomplete. It is NOT recommended to make multiple
162+
checkouts of a superproject.
162163

163164
git-worktree could provide more automation for tasks currently
164165
performed manually, such as:

Documentation/git.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ Git so take care if using Cogito etc.
845845
normally in $GIT_DIR will be taken from this path
846846
instead. Worktree-specific files such as HEAD or index are
847847
taken from $GIT_DIR. See linkgit:gitrepository-layout[5] and
848-
the section 'MULTIPLE CHECKOUT MODE' in linkgit:checkout[1]
848+
linkgit:git-worktree[1] for
849849
details. This variable has lower precedence than other path
850850
variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...
851851

0 commit comments

Comments
 (0)