Another unknown command, but with a disclaimer
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
How do I used to switch branch
// switch to existing branch
$ git checkout <existing_branch>
// create and switch to new branch
$ git checkout -b <new_branch>
How I have started switching branch now
// switch to existing branch
$ git switch <existing_branch>
// create and switch to new branch
$ git switch -c <new_branch>
All git switch
options
git switch [<options>] [--no-guess] <branch>
git switch [<options>] --detach [<start-point>]
git switch [<options>] (-c|-C) <new-branch> [<start-point>]
git switch [<options>] --orphan <new-branch>
Kumar Nitesh
Top comments (0)