diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-11-30 15:24:47 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-01 11:00:16 -0800 |
commit | 529fef20cf94dbd5c16f7a239ffc2b06f3cf8bb7 (patch) | |
tree | 732a63391953b43db6a149b585822e2bcd57f9f6 /Documentation/git.txt | |
parent | use new wrapper write_file() for simple file writing (diff) | |
download | tgif-529fef20cf94dbd5c16f7a239ffc2b06f3cf8bb7.tar.xz |
checkout: support checking out into a new working directory
"git checkout --to" sets up a new working directory with a .git file
pointing to $GIT_DIR/worktrees/<id>. It then executes "git checkout"
again on the new worktree with the same arguments except "--to" is
taken out. The second checkout execution, which is not contaminated
with any info from the current repository, will actually check out and
everything that normal "git checkout" does.
Helped-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
-rw-r--r-- | Documentation/git.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt index 96354af0d7..0c2dcfa9cc 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -813,7 +813,8 @@ Git so take care if using Cogito etc. If this variable is set to a path, non-worktree files that are normally in $GIT_DIR will be taken from this path instead. Worktree-specific files such as HEAD or index are - taken from $GIT_DIR. See linkgit:gitrepository-layout[5] for + taken from $GIT_DIR. See linkgit:gitrepository-layout[5] and + the section 'MULTIPLE CHECKOUT MODE' in linkgit:checkout[1] details. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY... |