Merge branch 'maint'
[gitweb.git] / Documentation / git-show-branch.txt
index 948ff10e6c83b8842de453e798ff7916ac98d911..89ec5364ecd447f6a7836d9c7f582dbd1d864807 100644 (file)
@@ -8,9 +8,12 @@ git-show-branch - Show branches and their commits
 SYNOPSIS
 --------
 [verse]
-'git-show-branch' [--all] [--heads] [--tags] [--topo-order] [--current]
+'git show-branch' [--all] [--remotes] [--topo-order | --date-order]
+               [--current] [--color | --no-color]
                [--more=<n> | --list | --independent | --merge-base]
-               [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...
+               [--no-name | --sha1-name] [--topics]
+               [<rev> | <glob>]...
+'git show-branch' (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]
 
 DESCRIPTION
 -----------
@@ -28,8 +31,8 @@ no <rev> nor <glob> is given on the command line.
 OPTIONS
 -------
 <rev>::
-       Arbitrary extended SHA1 expression (see `git-rev-parse`)
-       that typically names a branch HEAD or a tag.
+       Arbitrary extended SHA1 expression (see linkgit:git-rev-parse[1])
+       that typically names a branch head or a tag.
 
 <glob>::
        A glob pattern that matches branch or tag names under
@@ -37,9 +40,13 @@ OPTIONS
        branches under $GIT_DIR/refs/heads/topic, giving
        `topic/*` would show all of them.
 
---all --heads --tags::
-       Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads,
-       and $GIT_DIR/refs/tags, respectively.
+-r::
+--remotes::
+       Show the remote-tracking branches.
+
+-a::
+--all::
+       Show both remote-tracking branches and local branches.
 
 --current::
        With this option, the command includes the current
@@ -52,6 +59,11 @@ OPTIONS
         appear in topological order (i.e., descendant commits
         are shown before their parents).
 
+--date-order::
+       This option is similar to '--topo-order' in the sense that no
+       parent comes before all of its children, but otherwise commits
+       are ordered according to their commit date.
+
 --sparse::
        By default, the output omits merges that are reachable
        from only one tip being shown.  This option makes them
@@ -94,6 +106,22 @@ OPTIONS
        will show the revisions given by "git rev-list {caret}master
        topic1 topic2"
 
+-g::
+--reflog[=<n>[,<base>]] [<ref>]::
+       Shows <n> most recent ref-log entries for the given
+       ref.  If <base> is given, <n> entries going back from
+       that entry.  <base> can be specified as count or date.
+       When no explicit <ref> parameter is given, it defaults to the
+       current branch (or `HEAD` if it is detached).
+
+--color::
+       Color the status sign (one of these: `*` `!` `+` `-`) of each commit
+       corresponding to the branch it's in.
+
+--no-color::
+       Turn off colored output, even when the configuration file gives the
+       default to color output.
+
 Note that --more, --list, --independent and --merge-base options
 are mutually exclusive.
 
@@ -135,9 +163,10 @@ $ git show-branch master fixes mhf
 ------------------------------------------------
 
 These three branches all forked from a common commit, [master],
-whose commit message is "Add 'git show-branch'.  "fixes" branch
-adds one commit 'Introduce "reset type"'.  "mhf" branch has many
-other commits.  The current branch is "master".
+whose commit message is "Add \'git show-branch\'". The "fixes"
+branch adds one commit "Introduce "reset type" flag to "git reset"".
+The "mhf" branch adds many other commits. The current branch
+is "master".
 
 
 EXAMPLE
@@ -158,11 +187,18 @@ With this, `git show-branch` without extra parameters would show
 only the primary branches.  In addition, if you happen to be on
 your topic branch, it is shown as well.
 
+------------
+$ git show-branch --reflog="10,1 hour ago" --list master
+------------
+
+shows 10 reflog entries going back from the tip as of 1 hour ago.
+Without `--list`, the output also shows how these tips are
+topologically related with each other.
 
 
 Author
 ------
-Written by Junio C Hamano <junkio@cox.net>
+Written by Junio C Hamano <gitster@pobox.com>
 
 
 Documentation
@@ -172,4 +208,4 @@ Documentation by Junio C Hamano.
 
 GIT
 ---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[1] suite