7408d3e4adc86b428c994912b399aae0daa99da6
[git.git] / man1 / git-show-branch.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-SHOW-BRANCH" 1 "" "" ""
21 .SH NAME
22 git-show-branch \- Show branches and their commits.
23 .SH "SYNOPSIS"
24
25 .nf
26 git\-show\-branch [\-\-all] [\-\-heads] [\-\-tags] [\-\-topo\-order] [\-\-current]
27         [\-\-more=<n> | \-\-list | \-\-independent | \-\-merge\-base]
28         [\-\-no\-name | \-\-sha1\-name] [<rev> | <glob>]...
29 .fi
30
31 .SH "DESCRIPTION"
32
33
34 Shows the commit ancestry graph starting from the commits named with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads and/or $GIT_DIR/refs/tags) semi\-visually\&.
35
36
37 It cannot show more than 29 branches and commits at a time\&.
38
39
40 It uses showbranch\&.default multi\-valued configuration items if no <rev> nor <glob> is given on the command line\&.
41
42 .SH "OPTIONS"
43
44 .TP
45 <rev>
46 Arbitrary extended SHA1 expression (see git\-rev\-parse) that typically names a branch HEAD or a tag\&.
47
48 .TP
49 <glob>
50 A glob pattern that matches branch or tag names under $GIT_DIR/refs\&. For example, if you have many topic branches under $GIT_DIR/refs/heads/topic, giving topic/* would show all of them\&.
51
52 .TP
53 \-\-all \-\-heads \-\-tags
54 Show all refs under $GIT_DIR/refs, $GIT_DIR/refs/heads, and $GIT_DIR/refs/tags, respectively\&.
55
56 .TP
57 \-\-current
58 With this option, the command includes the current branch to the list of revs to be shown when it is not given on the command line\&.
59
60 .TP
61 \-\-topo\-order
62 By default, the branches and their commits are shown in reverse chronological order\&. This option makes them appear in topological order (i\&.e\&., descendant commits are shown before their parents)\&.
63
64 .TP
65 \-\-more=<n>
66 Usually the command stops output upon showing the commit that is the common ancestor of all the branches\&. This flag tells the command to go <n> more common commits beyond that\&. When <n> is negative, display only the <reference>s given, without showing the commit ancestry tree\&.
67
68 .TP
69 \-\-list
70 Synonym to \-\-more=\-1 
71
72 .TP
73 \-\-merge\-base
74 Instead of showing the commit list, just act like the git\-merge\-base \-a command, except that it can accept more than two heads\&.
75
76 .TP
77 \-\-independent
78 Among the <reference>s given, display only the ones that cannot be reached from any other <reference>\&.
79
80 .TP
81 \-\-no\-name
82 Do not show naming strings for each commit\&.
83
84 .TP
85 \-\-sha1\-name
86 Instead of naming the commits using the path to reach them from heads (e\&.g\&. "master~2" to mean the grandparent of "master"), name them with the unique prefix of their object names\&.
87
88
89 Note that \-\-more, \-\-list, \-\-independent and \-\-merge\-base options are mutually exclusive\&.
90
91 .SH "OUTPUT"
92
93
94 Given N <references>, the first N lines are the one\-line description from their commit message\&. The branch head that is pointed at by $GIT_DIR/HEAD is prefixed with an asterisk * character while other heads are prefixed with a ! character\&.
95
96
97 Following these N lines, one\-line log for each commit is displayed, indented N places\&. If a commit is on the I\-th branch, the I\-th indentation character shows a + sign; otherwise it shows a space\&. Merge commits are denoted by a \- sign\&. Each commit shows a short name that can be used as an extended SHA1 to name that commit\&.
98
99
100 The following example shows three branches, "master", "fixes" and "mhf":
101
102 .IP
103 $ git show\-branch master fixes mhf
104 * [master] Add 'git show\-branch'\&.
105  ! [fixes] Introduce "reset type" flag to "git reset"
106   ! [mhf] Allow "+remote:local" refspec to cause \-\-force when fetching\&.
107 \-\-\-
108   + [mhf] Allow "+remote:local" refspec to cause \-\-force when fetching\&.
109   + [mhf~1] Use git\-octopus when pulling more than one heads\&.
110  +  [fixes] Introduce "reset type" flag to "git reset"
111   + [mhf~2] "git fetch \-\-force"\&.
112   + [mhf~3] Use \&.git/remote/origin, not \&.git/branches/origin\&.
113   + [mhf~4] Make "git pull" and "git fetch" default to origin
114   + [mhf~5] Infamous 'octopus merge'
115   + [mhf~6] Retire git\-parse\-remote\&.
116   + [mhf~7] Multi\-head fetch\&.
117   + [mhf~8] Start adding the $GIT_DIR/remotes/ support\&.
118 *++ [master] Add 'git show\-branch'\&.
119
120 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"\&.
121
122 .SH "EXAMPLE"
123
124
125 If you keep your primary branches immediately under $GIT_DIR/refs/heads, and topic branches in subdirectories of it, having the following in the configuration file may help:
126
127 .IP
128 [showbranch]
129         default = \-\-topo\-order
130         default = heads/*
131
132
133 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\&.
134
135 .SH "AUTHOR"
136
137
138 Written by Junio C Hamano <junkio@cox\&.net>
139
140 .SH "DOCUMENTATION"
141
142
143 Documentation by Junio C Hamano\&.
144
145 .SH "GIT"
146
147
148 Part of the \fBgit\fR(7) suite
149