git branch # code example
Example 1: git branch
git checkout -b <new-branch-name> # create a new branch
git switch <branch-name> # Switch branch
Example 2: git branch command
git branch <branchname>
(or)
git checkout -b <branchname>
git checkout -b <new-branch-name> # create a new branch
git switch <branch-name> # Switch branch
git branch <branchname>
(or)
git checkout -b <branchname>