X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-branch.txt;h=0427e80a35601e689a47299dce9c5517959bddf8;hb=80a3f53424b2e3d6d7b9463dbd3faa888ced947f;hp=507b8d0ab2a2d524a607c5b91e6d17f6d2f36392;hpb=8769e93327f5efc26d179d794a67a5b993cd3693;p=git.git diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 507b8d0ab..0427e80a3 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -9,18 +9,23 @@ SYNOPSIS -------- [verse] 'git branch' [--color[=] | --no-color] [-r | -a] - [-v [--abbrev= | --no-abbrev]] - [(--merged | --no-merged | --contains) []] + [--list] [-v [--abbrev= | --no-abbrev]] + [(--merged | --no-merged | --contains) []] [...] 'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] 'git branch' (-m | -M) [] 'git branch' (-d | -D) [-r] ... +'git branch' --edit-description [] DESCRIPTION ----------- With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk. Option `-r` causes the remote-tracking -branches to be listed, and option `-a` shows both. +branches to be listed, and option `-a` shows both. This list mode is also +activated by the `--list` option (see below). + restricts the output to matching branches, the pattern is a shell +wildcard (i.e., matched using fnmatch(3)) +Multiple patterns may be given; if any of them matches, the tag is shown. With `--contains`, shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the @@ -64,6 +69,7 @@ way to clean up all obsolete remote-tracking branches. OPTIONS ------- -d:: +--delete:: Delete a branch. The branch must be fully merged in its upstream branch, or in `HEAD` if no upstream was set with `--track` or `--set-upstream`. @@ -72,6 +78,7 @@ OPTIONS Delete a branch irrespective of its merged status. -l:: +--create-reflog:: Create the branch's reflog. This activates recording of all changes made to the branch ref, enabling use of date based sha1 expressions such as "@\{yesterday}". @@ -84,6 +91,7 @@ OPTIONS already. Without `-f` 'git branch' refuses to change an existing branch. -m:: +--move:: Move/rename a branch and the corresponding reflog. -M:: @@ -100,14 +108,21 @@ OPTIONS Same as `--color=never`. -r:: +--remotes:: List or delete (if used with -d) the remote-tracking branches. -a:: +--all:: List both remote-tracking branches and local branches. +--list:: + Activate the list mode. `git branch ` would try to create a branch, + use `git branch --list ` to list matching branches. + -v:: --verbose:: - Show sha1 and commit subject line for each head, along with + When in list mode, + show sha1 and commit subject line for each head, along with relationship to upstream branch (if any). If given twice, print the name of the upstream branch, as well. @@ -144,6 +159,10 @@ start-point is either a local or remote-tracking branch. like '--track' would when creating the branch, except that where branch points to is not changed. +--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. `request-pull`). + --contains :: Only list branches which contain the specified commit.