When creating a new branch, you can use git branch
but also git checkout -b
, the difference is as follows:
git branch BRANCH_NAME
creates a new branch but leaves you on the same branch.
git checkout -b BRANCH_NAME
creates a new branch and checks out the new branch.