branch
is specified it defaults to the current branch.
`--edit-description`::
Open an editor and edit the text to explain what the branch is
for, to be used by various other commands (e.g. `format-patch`,
`request-pull`, and `merge` (if enabled)). Multi-line explanations
may be used.
`--contains [<commit>]`::
Only list branches which contain _<commit>_ (`HEAD`
if not specified). Implies `--list`.
`--no-contains [<commit>]`::
Only list branches which don't contain _<commit>_
(`HEAD` if not specified). Implies `--list`.
`--merged [<commit>]`::
Only list branches whose tips are reachable from
_<commit>_ (`HEAD` if not specified). Implies `--list`.
`--no-merged [<commit>]`::
Only list branches whose tips are not reachable from
_<commit>_ (`HEAD` if not specified). Implies `--list`.
`--points-at <object>`::
Only list branches of _<object>_.
`--format <format>`::
A string that interpolates `%(fieldname)` from a branch ref being shown
and the object it points at. _<format>_ is the same as
that of linkgit:git-for-each-ref[1].
_<branch-name>_::
The name of the branch to create or delete.
The new branch name must pass all checks defined by
linkgit:git-check-ref-format[1]. Some of these checks
may restrict the characters allowed in a branch name.
_<start-point>_::
The new branch head will point to this commit. It may be
given as a branch name, a commit-id, or a tag. If this
option is omitted, the current `HEAD` will be used instead.
_<old-branch>_::
The name of an existing branch. If this option is omitted,
the name of the current branch will be used instead.
_<new-branch>_::
The new name for an existing branch. The same restrictions as for
_<branch-name>_ apply.
CONFIGURATION
-------------
`pager.branch` is only respected when listing branches, i.e., when
`--list` is used or implied. The default is to use a pager.
See linkgit:git-config[1].
include::includes/cmd-config-section-rest.adoc[]
include::config/branch.adoc[]
EXAMPLES
--------
Start development from a known tag::
+
------------
$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
$ cd my2.6
$ git branch my2.6.14 v2.6.14 <1>
$ git switch my2.6.14
------------
+
<1> This step and the next one could be combined into a single