GIT 1.0.7
[git.git] / Documentation / git-show-branch.txt
1 git-show-branch(1)
2 ==================
3
4 NAME
5 ----
6 git-show-branch - Show branches and their commits.
7
8 SYNOPSIS
9 --------
10 'git-show-branch [--all] [--heads] [--tags] [--topo-order] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [<rev> | <glob>]...'
11
12 DESCRIPTION
13 -----------
14
15 Shows the commit ancestry graph starting from the commits named
16 with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
17 and/or $GIT_DIR/refs/tags) semi-visually.
18
19 It cannot show more than 29 branches and commits at a time.
20
21
22 OPTIONS
23 -------
24 <rev>::
25         Arbitrary extended SHA1 expression (see `git-rev-parse`)
26         that typically names a branch HEAD or a tag.
27
28 <glob>::
29         A glob pattern that matches branch or tag names under
30         $GIT_DIR/refs.  For example, if you have many topic
31         branches under $GIT_DIR/refs/heads/topic, giving
32         `topic/*` would show all of them.
33
34 --all --heads --tags::
35         Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads,
36         and $GIT_DIR/refs/tags, respectively.
37
38 --topo-order::
39         By default, the branches and their commits are shown in
40         reverse chronological order.  This option makes them
41         appear in topological order (i.e., descendant commits
42         are shown before their parents).
43
44 --more=<n>::
45         Usually the command stops output upon showing the commit
46         that is the common ancestor of all the branches.  This
47         flag tells the command to go <n> more common commits
48         beyond that.  When <n> is negative, display only the
49         <reference>s given, without showing the commit ancestry
50         tree.
51
52 --list::
53         Synomym to `--more=-1`
54
55 --merge-base::
56         Instead of showing the commit list, just act like the
57         'git-merge-base -a' command, except that it can accept
58         more than two heads.
59
60 --independent::
61         Among the <reference>s given, display only the ones that
62         cannot be reached from any other <reference>.
63
64 --no-name::
65         Do not show naming strings for each commit.
66
67 --sha1-name::
68         Instead of naming the commits using the path to reach
69         them from heads (e.g. "master~2" to mean the grandparent
70         of "master"), name them with the unique prefix of their
71         object names.
72
73 Note that --more, --list, --independent and --merge-base options
74 are mutually exclusive.
75
76
77 OUTPUT
78 ------
79 Given N <references>, the first N lines are the one-line
80 description from their commit message.  The branch head that is
81 pointed at by $GIT_DIR/HEAD is prefixed with an asterisk '*'
82 character while other heads are prefixed with a '!' character.
83
84 Following these N lines, one-line log for each commit is
85 displayed, indented N places.  If a commit is on the I-th
86 branch, the I-th indentation character shows a '+' sign;
87 otherwise it shows a space.  Each commit shows a short name that
88 can be used as an extended SHA1 to name that commit.
89
90 The following example shows three branches, "master", "fixes"
91 and "mhf":
92
93 ------------------------------------------------
94 $ git show-branch master fixes mhf
95 ! [master] Add 'git show-branch'.
96  ! [fixes] Introduce "reset type" flag to "git reset"
97   ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
98 ---
99   + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
100   + [mhf~1] Use git-octopus when pulling more than one heads.
101  +  [fixes] Introduce "reset type" flag to "git reset"
102   + [mhf~2] "git fetch --force".
103   + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
104   + [mhf~4] Make "git pull" and "git fetch" default to origin
105   + [mhf~5] Infamous 'octopus merge'
106   + [mhf~6] Retire git-parse-remote.
107   + [mhf~7] Multi-head fetch.
108   + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
109 +++ [master] Add 'git show-branch'.
110 ------------------------------------------------
111
112 These three branches all forked from a common commit, [master],
113 whose commit message is "Add 'git show-branch'.  "fixes" branch
114 adds one commit 'Introduce "reset type"'.  "mhf" branch has many
115 other commits.
116
117
118 Author
119 ------
120 Written by Junio C Hamano <junkio@cox.net>
121
122
123 Documentation
124 --------------
125 Documentation by Junio C Hamano.
126
127
128 GIT
129 ---
130 Part of the gitlink:git[7] suite