create a new branch from existing branch in git

C++
git checkout -b branch-name//when on branch 'dev' make branch 'myFeature' off of 'dev'
git checkout -b myFeature devgit checkout -b subbranch_of_b1 branch1
$ git checkout -b myfeature dev
$ git checkout -b myFeature dev
$ git checkout -b <branch-name>

Source

Also in C++: