Use checkout -b to create and switch to a branch.