path: root/Documentation
diff options
authorJunio C Hamano <>2011-10-05 19:36:23 (GMT)
committerJunio C Hamano <>2011-10-05 19:36:23 (GMT)
commit1077bf1ff676cd172a09b88204422228f21d7cbf (patch)
tree09198a4933da76f03c78ab6c088999a1e2fe0ce1 /Documentation
parent3c18ee72cc2f3d0024b7314cdb1af5d41aea136a (diff)
parent376eb14a05f693378047eee36a10035c122f0261 (diff)
Merge branch 'mg/branch-list'
* mg/branch-list: t3200: clean up checks for file existence branch: -v does not automatically imply --list branch: allow pattern arguments branch: introduce --list option git-branch: introduce missing long forms for the options git-tag: introduce long forms for the options t6040: test branch -vv Conflicts: Documentation/git-tag.txt t/
Diffstat (limited to 'Documentation')
2 files changed, 26 insertions, 4 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 507b8d0..f46013c 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -9,8 +9,8 @@ SYNOPSIS
'git branch' [--color[=<when>] | --no-color] [-r | -a]
- [-v [--abbrev=<length> | --no-abbrev]]
- [(--merged | --no-merged | --contains) [<commit>]]
+ [--list] [-v [--abbrev=<length> | --no-abbrev]]
+ [(--merged | --no-merged | --contains) [<commit>]] [<pattern>...]
'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (-m | -M) [<oldbranch>] <newbranch>
'git branch' (-d | -D) [-r] <branchname>...
@@ -20,7 +20,11 @@ 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).
+<pattern> 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 +68,7 @@ way to clean up all obsolete remote-tracking branches.
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 +77,7 @@ OPTIONS
Delete a branch irrespective of its merged status.
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 "<branchname>@\{yesterday}".
@@ -84,6 +90,7 @@ OPTIONS
already. Without `-f` 'git branch' refuses to change an existing branch.
Move/rename a branch and the corresponding reflog.
@@ -100,14 +107,21 @@ OPTIONS
Same as `--color=never`.
List or delete (if used with -d) the remote-tracking branches.
List both remote-tracking branches and local branches.
+ Activate the list mode. `git branch <pattern>` would try to create a branch,
+ use `git branch --list <pattern>` to list matching branches.
- 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.
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index fb1c0ac..c83cb13 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -43,12 +43,15 @@ GnuPG key for signing.
Make an unsigned, annotated tag object
Make a GPG-signed tag, using the default e-mail address's key
-u <key-id>::
Make a GPG-signed tag, using the given key
@@ -56,9 +59,11 @@ OPTIONS
Replace an existing tag with the given name (instead of failing)
Delete existing tags with the given names.
Verify the gpg signature of the given tag names.
@@ -69,6 +74,7 @@ OPTIONS
If the tag is not annotated, the commit message is displayed instead.
-l <pattern>::
+--list <pattern>::
List tags with names that match the given pattern (or all if no
pattern is given). Running "git tag" without arguments also
lists all tags. The pattern is a shell wildcard (i.e., matched
@@ -79,6 +85,7 @@ OPTIONS
Only list tags which contain the specified commit.
-m <msg>::
Use the given tag message (instead of prompting).
If multiple `-m` options are given, their values are
concatenated as separate paragraphs.
@@ -86,6 +93,7 @@ OPTIONS
is given.
-F <file>::
Take the tag message from the given file. Use '-' to
read the message from the standard input.
Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`