diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:02 -0700 |
commit | 6d41eb685a709b405ba0119453aaad3ad3888b7c (patch) | |
tree | ee256b65976d8f27492500356b6a38aa3f57dd28 /Documentation | |
parent | Merge branch 'et/pretty-format-c-auto' (diff) | |
parent | worktree: allow "-" short-hand for @{-1} in add command (diff) | |
download | tgif-6d41eb685a709b405ba0119453aaad3ad3888b7c.tar.xz |
Merge branch 'jg/dash-is-last-branch-in-worktree-add'
"git worktree add" learned that '-' can be used as a short-hand for
"@{-1}", the previous branch.
* jg/dash-is-last-branch-in-worktree-add:
worktree: allow "-" short-hand for @{-1} in add command
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-worktree.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index c62234538b..23d8d2ace0 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -48,7 +48,8 @@ add <path> [<branch>]:: Create `<path>` and checkout `<branch>` into it. The new working directory is linked to the current repository, sharing everything except working -directory specific files such as HEAD, index, etc. +directory specific files such as HEAD, index, etc. `-` may also be +specified as `<branch>`; it is synonymous with `@{-1}`. + If `<branch>` is omitted and neither `-b` nor `-B` nor `--detached` used, then, as a convenience, a new branch based at HEAD is created automatically, |