Branch to checkout; if it refers to a branch, then that branch is checked out.
Otherwise, if it refers to a valid commit, your HEAD
becomes "detached" and you are no
longer on any branch.
When switching branches, proceed even if the index or the working tree differs from HEAD
.
This is used to throw away local changes.
When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. However, with this option, a three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch.
The name for the new local branch.
Options for checking out branches.