xxxxxxxxxx
// Example for creating a new branch named myNewBranch
git checkout -b myNewBranch
// First Push
git push --set-upstream origin myNewBranch
xxxxxxxxxx
$ git checkout -b [your_branch_name]
# Switched to a new branch [your_branch_name]
# This is shorthand for:
$ git branch [your_branch_name]
$ git checkout [your_branch_name]
xxxxxxxxxx
How to create a new branch in git
$ git checkout -b good
here good is new branch name
the line 3 after executing we will go to that branch
xxxxxxxxxx
// create a branch
git branch <branchName>
// create a branch and switch to it a the same time use
git checkout -b <branchName>
// switch to a branch
git checkout <branchName>
// or
git switch <branchName>