Branch
Create a New Branch
git checkout
# create a new branch checkouted from current commit, and switch to the new branch
$ git checkout -b <new_branch_name>
# create a new branch checkouted based on a specific reference (branch, remote/branch, tag are examples of valid references)
$ git checkout -b <new_branch_name> <reference>
# e.g.,
$ git checkout -b feature-branch master
git branch
# Create new branch based on the current commit (but doesn't switch to the new branch created)
$ git branch <branch_name>
# Create new branch based on a specific commit
$ git branch <branch_name> <commit_hash>