creating new branch in git

C++
// Example for creating a new branch named myNewBranch
git checkout -b myNewBranch

// First Push
git push --set-upstream origin myNewBranch# Create New Branch And Switch To It
$ git checkout -b myBranchName$ git checkout -b myfeature dev
Create a new branch named issue1.

$ git branch testing$ git checkout -b <branch-name>
$ git branch [name of branch]
Source

Also in C++: