git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert Simpson" <no-reply@MailScreen.com>
To: "Git Bug Reports" <git@vger.kernel.org>
Subject: Git error message suggests an invalid switch
Date: Tue, 28 Apr 2020 19:12:42 -0400	[thread overview]
Message-ID: <60af77100df823b4112c08e6c1b8533f.squirrel@socialwebmail.com> (raw)

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


             reply	other threads:[~2020-04-28 23:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 23:12 Robert Simpson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60af77100df823b4112c08e6c1b8533f.squirrel@socialwebmail.com \
    --to=no-reply@mailscreen.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).