summaryrefslogtreecommitdiff
path: root/Documentation/git-worktree.txt
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2017-11-26 19:43:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-27 00:48:06 (GMT)
commite284e892ca278e4eb1e7eabd53a000bc897c3f25 (patch)
tree6d8ef3b931f817cdcaf1eab9909bbc4e879d64a2 /Documentation/git-worktree.txt
parentc4738aedc0aee085e25e20b6c32b9c4680f265d1 (diff)
downloadgit-e284e892ca278e4eb1e7eabd53a000bc897c3f25.zip
git-e284e892ca278e4eb1e7eabd53a000bc897c3f25.tar.gz
git-e284e892ca278e4eb1e7eabd53a000bc897c3f25.tar.bz2
worktree: add --[no-]track option to the add subcommand
Currently 'git worktree add' sets up tracking branches if '<branch>' is a remote tracking branch, and doesn't set them up otherwise, as is the default for 'git branch'. This may or may not be what the user wants. Allow overriding this behaviour with a --[no-]track flag that gets passed through to 'git branch'. We already respect branch.autoSetupMerge, as 'git worktree' just calls 'git branch' internally. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-worktree.txt')
-rw-r--r--Documentation/git-worktree.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 1218952..15e58b1 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -107,6 +107,12 @@ OPTIONS
such as configuring sparse-checkout. See "Sparse checkout"
in linkgit:git-read-tree[1].
+--[no-]track::
+ When creating a new branch, if `<commit-ish>` is a branch,
+ mark it as "upstream" from the new branch. This is the
+ default if `<commit-ish>` is a remote-tracking branch. See
+ "--track" in linkgit:git-branch[1] for details.
+
--lock::
Keep the working tree locked after creation. This is the
equivalent of `git worktree lock` after `git worktree add`,