git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git error message suggests an invalid switch
@ 2020-04-28 23:12 Robert Simpson
  2020-04-29  9:00 ` [PATCH] switch: fix errors and comments related to -c and -C Denton Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Simpson @ 2020-04-28 23:12 UTC (permalink / raw)
  To: Git Bug Reports

The command below shows an error message that says "try -b". However "-b"
is not a valid switch for the command, as indicated by "unknown swtich
'b'" when that has been added to the command.

--------------------------------------------------------------------
git switch "master" --track "origin/master"

fatal: missing branch name; try -b

git switch -b "master" --track "origin/master"

error: unknown switch `b'
usage: git switch [<options>] [<branch>]

    -c, --create <branch>
                          create and switch to a new branch
    -C, --force-create <branch>
                          create/reset and switch to a branch
    --guess               second guess 'git switch <no-such-branch>'
    --discard-changes     throw away local modifications
    -q, --quiet           suppress progress reporting
    --recurse-submodules[=<checkout>]
                          control recursive updating of submodules
    --progress            force progress reporting
    -m, --merge           perform a 3-way merge with the new branch
    --conflict <style>    conflict style (merge or diff3)
    -d, --detach          detach HEAD at named commit
    -t, --track           set upstream info for new branch
    -f, --force           force checkout (throw away local modifications)
    --orphan <new-branch>
                          new unparented branch
    --overwrite-ignore    update ignored files (default)
    --ignore-other-worktrees
                          do not check if another worktree is holding the
given ref


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-30 20:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 23:12 Git error message suggests an invalid switch Robert Simpson
2020-04-29  9:00 ` [PATCH] switch: fix errors and comments related to -c and -C Denton Liu
2020-04-29 16:09   ` Taylor Blau
2020-04-29 16:31     ` Eric Sunshine
2020-04-29 16:35   ` Junio C Hamano
2020-04-30 11:54   ` [PATCH v2] " Denton Liu
2020-04-30 16:21     ` Taylor Blau
2020-04-30 20:45       ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).