... or just read this. π
$ git clone -b [branch_name] --single-branch [git-url]
create new branch
$ git branch [new_branch_name]
use branch
$ git checkout [branch_name]
delete branch
$ git branch -D [branch_name]
automatically stage all changes and commit
$ git commit -a -m "commit message"
If you want to merge A to B, follow below steps.
checkout B branch
$ git checkout [branch_B]
merge A branch into B
$ git merge [branch_A]