How to create branch in git?

By using below commands we can create/switch new branch

 

git checkout [branch name]

used to switch from one branch to another.

git checkout -b [branch name]

creates a new branch and also switches to it