From 0f4af3b9ea1fc62e445271bb2e7fbb8e1ac230b7 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 6 Jul 2015 13:30:58 -0400 Subject: worktree: add: make -b/-B default to HEAD when is omitted As a convenience, like "git branch" and "git checkout -b", make "git worktree add -b " default to HEAD when is omitted. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- Documentation/git-worktree.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/git-worktree.txt') diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index f44cd78784..377ae0f92e 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -68,6 +68,7 @@ OPTIONS -B :: With `add`, create a new branch named `` starting at ``, and check out `` into the new worktree. + If `` is omitted, it defaults to HEAD. By default, `-b` refuses to create a new branch if it already exists. `-B` overrides this safeguard, resetting `` to ``. -- cgit v1.2.3