Merge branch 'es/wt-add-detach'
"git worktree add" learns that the "-d" is a synonym to "--detach" option to create a new worktree without being on a branch. * es/wt-add-detach: git-worktree.txt: discuss branch-based vs. throwaway worktrees worktree: teach `add` to recognize -d as shorthand for --detach git-checkout.txt: document -d short option for --detach
This commit is contained in:
@ -555,7 +555,7 @@ static int add(int ac, const char **av, const char *prefix)
|
||||
N_("create a new branch")),
|
||||
OPT_STRING('B', NULL, &new_branch_force, N_("branch"),
|
||||
N_("create or reset a branch")),
|
||||
OPT_BOOL(0, "detach", &opts.detach, N_("detach HEAD at named commit")),
|
||||
OPT_BOOL('d', "detach", &opts.detach, N_("detach HEAD at named commit")),
|
||||
OPT_BOOL(0, "checkout", &opts.checkout, N_("populate the new working tree")),
|
||||
OPT_BOOL(0, "lock", &opts.keep_locked, N_("keep the new working tree locked")),
|
||||
OPT__QUIET(&opts.quiet, N_("suppress progress reporting")),
|
||||
|
Reference in New Issue
Block a user