aboutsummaryrefslogtreecommitdiff
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-12-19 11:33:57 -0800
committerJunio C Hamano <gitster@pobox.com>2017-12-19 11:33:57 -0800
commit66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8 (patch)
treee94fa30407c0068170f6c19a94adadd66fcbeca7 /Documentation/config.txt
parent1974f4791af2b8720f2983149defe13e571b3884 (diff)
parente92445a73173cf21a11b8e79cb7be16485deec69 (diff)
downloadgit-66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8.tar.gz
git-66d3f19324ac9eeae8ef0d2ae2067ae7b18f8ac8.tar.xz
Merge branch 'tg/worktree-create-tracking'
The way "git worktree add" determines what branch to create from where and checkout in the new worktree has been updated a bit. * tg/worktree-create-tracking: add worktree.guessRemote config option worktree: add --guess-remote flag to add subcommand worktree: make add <path> <branch> dwim worktree: add --[no-]track option to the add subcommand worktree: add can be created from any commit-ish checkout: factor out functions to new lib file
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c1598ee70..9fac2f2b8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -3468,3 +3468,13 @@ web.browser::
Specify a web browser that may be used by some commands.
Currently only linkgit:git-instaweb[1] and linkgit:git-help[1]
may use it.
+
+worktree.guessRemote::
+ With `add`, if no branch argument, and neither of `-b` nor
+ `-B` nor `--detach` are given, the command defaults to
+ creating a new branch from HEAD. If `worktree.guessRemote` is
+ set to true, `worktree add` tries to find a remote-tracking
+ branch whose name uniquely matches the new branch name. If
+ such a branch exists, it is checked out and set as "upstream"
+ for the new branch. If no such match can be found, it falls
+ back to creating a new branch from the current HEAD.