Test suite for sliding window mmap implementation.
[git.git] / Documentation / git-show-branch.txt
blob912e15bcba54d28d7e4f71ffd3f9da923f2a6385
1 git-show-branch(1)
2 ==================
4 NAME
5 ----
6 git-show-branch - Show branches and their commits
8 SYNOPSIS
9 --------
10 [verse]
11 'git-show-branch' [--all] [--remotes] [--topo-order] [--current]
12                 [--more=<n> | --list | --independent | --merge-base]
13                 [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...
14 'git-show-branch' --reflog[=<n>] <ref>
16 DESCRIPTION
17 -----------
19 Shows the commit ancestry graph starting from the commits named
20 with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
21 and/or $GIT_DIR/refs/tags) semi-visually.
23 It cannot show more than 29 branches and commits at a time.
25 It uses `showbranch.default` multi-valued configuration items if
26 no <rev> nor <glob> is given on the command line.
29 OPTIONS
30 -------
31 <rev>::
32         Arbitrary extended SHA1 expression (see `git-rev-parse`)
33         that typically names a branch HEAD or a tag.
35 <glob>::
36         A glob pattern that matches branch or tag names under
37         $GIT_DIR/refs.  For example, if you have many topic
38         branches under $GIT_DIR/refs/heads/topic, giving
39         `topic/*` would show all of them.
41 -r|--remotes::
42         Show the remote-tracking branches.
44 -a|--all::
45         Show both remote-tracking branches and local branches.
47 --current::
48         With this option, the command includes the current
49         branch to the list of revs to be shown when it is not
50         given on the command line.
52 --topo-order::
53         By default, the branches and their commits are shown in
54         reverse chronological order.  This option makes them
55         appear in topological order (i.e., descendant commits
56         are shown before their parents).
58 --sparse::
59         By default, the output omits merges that are reachable
60         from only one tip being shown.  This option makes them
61         visible.
63 --more=<n>::
64         Usually the command stops output upon showing the commit
65         that is the common ancestor of all the branches.  This
66         flag tells the command to go <n> more common commits
67         beyond that.  When <n> is negative, display only the
68         <reference>s given, without showing the commit ancestry
69         tree.
71 --list::
72         Synonym to `--more=-1`
74 --merge-base::
75         Instead of showing the commit list, just act like the
76         'git-merge-base -a' command, except that it can accept
77         more than two heads.
79 --independent::
80         Among the <reference>s given, display only the ones that
81         cannot be reached from any other <reference>.
83 --no-name::
84         Do not show naming strings for each commit.
86 --sha1-name::
87         Instead of naming the commits using the path to reach
88         them from heads (e.g. "master~2" to mean the grandparent
89         of "master"), name them with the unique prefix of their
90         object names.
92 --topics::
93         Shows only commits that are NOT on the first branch given.
94         This helps track topic branches by hiding any commit that
95         is already in the main line of development.  When given
96         "git show-branch --topics master topic1 topic2", this
97         will show the revisions given by "git rev-list {caret}master
98         topic1 topic2"
100 --reflog[=<n>] <ref>::
101         Shows <n> most recent ref-log entries for the given ref.
104 Note that --more, --list, --independent and --merge-base options
105 are mutually exclusive.
108 OUTPUT
109 ------
110 Given N <references>, the first N lines are the one-line
111 description from their commit message.  The branch head that is
112 pointed at by $GIT_DIR/HEAD is prefixed with an asterisk `*`
113 character while other heads are prefixed with a `!` character.
115 Following these N lines, one-line log for each commit is
116 displayed, indented N places.  If a commit is on the I-th
117 branch, the I-th indentation character shows a `+` sign;
118 otherwise it shows a space.  Merge commits are denoted by
119 a `-` sign.  Each commit shows a short name that
120 can be used as an extended SHA1 to name that commit.
122 The following example shows three branches, "master", "fixes"
123 and "mhf":
125 ------------------------------------------------
126 $ git show-branch master fixes mhf
127 * [master] Add 'git show-branch'.
128  ! [fixes] Introduce "reset type" flag to "git reset"
129   ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
131   + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
132   + [mhf~1] Use git-octopus when pulling more than one heads.
133  +  [fixes] Introduce "reset type" flag to "git reset"
134   + [mhf~2] "git fetch --force".
135   + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
136   + [mhf~4] Make "git pull" and "git fetch" default to origin
137   + [mhf~5] Infamous 'octopus merge'
138   + [mhf~6] Retire git-parse-remote.
139   + [mhf~7] Multi-head fetch.
140   + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
141 *++ [master] Add 'git show-branch'.
142 ------------------------------------------------
144 These three branches all forked from a common commit, [master],
145 whose commit message is "Add 'git show-branch'.  "fixes" branch
146 adds one commit 'Introduce "reset type"'.  "mhf" branch has many
147 other commits.  The current branch is "master".
150 EXAMPLE
151 -------
153 If you keep your primary branches immediately under
154 `$GIT_DIR/refs/heads`, and topic branches in subdirectories of
155 it, having the following in the configuration file may help:
157 ------------
158 [showbranch]
159         default = --topo-order
160         default = heads/*
162 ------------
164 With this, `git show-branch` without extra parameters would show
165 only the primary branches.  In addition, if you happen to be on
166 your topic branch, it is shown as well.
170 Author
171 ------
172 Written by Junio C Hamano <junkio@cox.net>
175 Documentation
176 --------------
177 Documentation by Junio C Hamano.
182 Part of the gitlink:git[7] suite