Branches in git - beginner commands

Create a new branch:

git branch test1
Switch to an existing branch:
git checkout test1
Create a new branch and switch to it:
git checkout -b test2
Delete a branch:
git branch -d test2
List all branches:
git branch