From 39ecb27436296361371d3caadcc9bc4a4e0b556d Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 6 Jul 2015 13:30:52 -0400 Subject: worktree: add --detach option One of git-worktree's roles is to populate the new worktree, much like git-checkout, and thus, for convenience, ought to support several of the same shortcuts. Toward this goal, add a --detach option to detach HEAD in the new worktree. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 8891de040f..231271b2f8 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -9,7 +9,7 @@ git-worktree - Manage multiple worktrees SYNOPSIS -------- [verse] -'git worktree add' [-f] +'git worktree add' [-f] [--detach] 'git worktree prune' [-n] [-v] [--expire ] DESCRIPTION @@ -64,6 +64,10 @@ OPTIONS is already checked out by another worktree. This option overrides that safeguard. +--detach:: + With `add`, detach HEAD in the new worktree. See "DETACHED HEAD" in + linkgit:git-checkout[1]. + -n:: --dry-run:: With `prune`, do not remove anything; just report what it would -- cgit v1.3-5-g9baa