Git error message suggests an invalid switch
- From
- Robert Simpson <no-reply@mailscreen.com>
- Date
- Apr 28, 2020, 23:12 UTC
- Message-ID
- <60af77100df823b4112c08e6c1b8533f.squirrel@socialwebmail.com>
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