From e284e892ca278e4eb1e7eabd53a000bc897c3f25 Mon Sep 17 00:00:00 2001 From: Thomas Gummerer Date: Sun, 26 Nov 2017 19:43:53 +0000 Subject: worktree: add --[no-]track option to the add subcommand Currently 'git worktree add' sets up tracking branches if '' 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 Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 121895209d..15e58b18f7 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 `` is a branch, + mark it as "upstream" from the new branch. This is the + default if `` 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`, -- cgit v1.3-5-g9baa