blob: ca182d0611ac61279c949739bfbbd0567fab69ee [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamano68cf15a2010-11-06 01:01:596<meta name="generator" content="AsciiDoc 8.4.5" />
7<title>git-show-branch(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
9/* Debug borders */
10p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11/*
12 border: 1px solid red;
13*/
14}
15
16body {
17 margin: 1em 5% 1em 5%;
18}
19
Junio C Hamanoba4b9282008-07-06 05:20:3120a {
21 color: blue;
22 text-decoration: underline;
23}
24a:visited {
25 color: fuchsia;
26}
Junio C Hamano1a4e8412005-12-27 08:17:2327
28em {
29 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5930 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2331}
32
33strong {
34 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5935 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2336}
37
38tt {
39 color: navy;
40}
41
42h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
48}
49
Junio C Hamanoba4b9282008-07-06 05:20:3150h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2351 border-bottom: 2px solid silver;
52}
53h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2354 padding-top: 0.5em;
55}
Junio C Hamanoba4b9282008-07-06 05:20:3156h3 {
57 float: left;
58}
59h3 + * {
60 clear: left;
61}
Junio C Hamano1a4e8412005-12-27 08:17:2362
63div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
66}
67
68hr {
69 border: 1px solid silver;
70}
71
72p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
75}
76
Junio C Hamano68cf15a2010-11-06 01:01:5977ul, ol, li > p {
78 margin-top: 0;
79}
80
Junio C Hamano1a4e8412005-12-27 08:17:2381pre {
82 padding: 0;
83 margin: 0;
84}
85
86span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3190 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:2391}
92span#email {
93}
Junio C Hamano68cf15a2010-11-06 01:01:5994span#revnumber, span#revdate, span#revremark {
Junio C Hamano1a4e8412005-12-27 08:17:2395 font-family: sans-serif;
96}
97
98div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
104}
105div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
108}
109div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
112}
113
Junio C Hamano68cf15a2010-11-06 01:01:59114div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
117}
Junio C Hamano1a4e8412005-12-27 08:17:23118div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120div.admonitionblock {
Junio C Hamano1a4e8412005-12-27 08:17:23121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
123}
124div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
127}
128
129div.content { /* Block element content. */
130 padding: 0;
131}
132
133/* Block element titles. */
134div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59135 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
141}
142div.title + * {
143 margin-top: 0;
144}
145
146td div.title:first-child {
147 margin-top: 0.0em;
148}
149div.content div.title:first-child {
150 margin-top: 0.0em;
151}
152div.content + div.title {
153 margin-top: 0.0em;
154}
155
156div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
160}
161
162div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
166}
167
Junio C Hamano68cf15a2010-11-06 01:01:59168div.quoteblock {
Junio C Hamano1a4e8412005-12-27 08:17:23169 padding-left: 2.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59170 margin-right: 10%;
Junio C Hamano1a4e8412005-12-27 08:17:23171}
Junio C Hamano68cf15a2010-11-06 01:01:59172div.quoteblock > div.attribution {
173 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23174 text-align: right;
175}
Junio C Hamano68cf15a2010-11-06 01:01:59176
177div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
180}
181div.verseblock > div.content {
182 white-space: pre;
183}
184div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
187}
188/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31189div.verseblock + div.attribution {
190 text-align: left;
191}
Junio C Hamano1a4e8412005-12-27 08:17:23192
193div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
200}
201div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
204}
205
206div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
209}
210
Junio C Hamano1a4e8412005-12-27 08:17:23211div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23212span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59213a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23214
215dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
218}
219dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59222 font-style: normal;
223 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23224}
225dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59226 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23227}
228
229ul, ol {
230 list-style-position: outside;
231}
Junio C Hamano68cf15a2010-11-06 01:01:59232ol.arabic {
233 list-style-type: decimal;
234}
235ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23236 list-style-type: lower-alpha;
237}
Junio C Hamano68cf15a2010-11-06 01:01:59238ol.upperalpha {
239 list-style-type: upper-alpha;
240}
241ol.lowerroman {
242 list-style-type: lower-roman;
243}
244ol.upperroman {
245 list-style-type: upper-roman;
246}
247
248div.compact ul, div.compact ol,
249div.compact p, div.compact p,
250div.compact div, div.compact div {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
253}
Junio C Hamano1a4e8412005-12-27 08:17:23254
255div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31256 border: 3px solid #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23257}
258thead {
259 font-family: sans-serif;
260 font-weight: bold;
261}
262tfoot {
263 font-weight: bold;
264}
Junio C Hamano68cf15a2010-11-06 01:01:59265td > div.verse {
266 white-space: pre;
267}
268p.table {
269 margin-top: 0;
270}
271/* Because the table frame attribute is overriden by CSS in most browsers. */
272div.tableblock > table[frame="void"] {
273 border-style: none;
274}
275div.tableblock > table[frame="hsides"] {
276 border-left-style: none;
277 border-right-style: none;
278}
279div.tableblock > table[frame="vsides"] {
280 border-top-style: none;
281 border-bottom-style: none;
282}
Junio C Hamano1a4e8412005-12-27 08:17:23283
Junio C Hamano68cf15a2010-11-06 01:01:59284
285div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
288}
Junio C Hamano68cf15a2010-11-06 01:01:59289div.hdlist tr {
290 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31291}
Junio C Hamano68cf15a2010-11-06 01:01:59292dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
294}
295td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23296 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59297 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23298 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59299 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23300}
Junio C Hamano68cf15a2010-11-06 01:01:59301td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23302 vertical-align: top;
303}
Junio C Hamano68cf15a2010-11-06 01:01:59304div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
307}
308
309.comment {
310 background: yellow;
311}
Junio C Hamano1a4e8412005-12-27 08:17:23312
313@media print {
314 div#footer-badges { display: none; }
315}
Junio C Hamanoba4b9282008-07-06 05:20:31316
317div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
324}
325
326div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
329}
330div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
333}
334div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
337}
338div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
341}
Junio C Hamano68cf15a2010-11-06 01:01:59342/* Overrides for manpage documents */
343h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
348}
349h2 {
350 border-style: none;
351}
352div.sectionbody {
353 margin-left: 5%;
354}
355
356@media print {
357 div#toc { display: none; }
358}
359
Junio C Hamano1a4e8412005-12-27 08:17:23360/* Workarounds for IE6's broken and incomplete CSS2. */
361
362div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
366}
367div.sidebar-title, div.image-title {
Junio C Hamano68cf15a2010-11-06 01:01:59368 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
373}
374
375div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
379}
380
Junio C Hamano68cf15a2010-11-06 01:01:59381div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
384}
385
386div.verseblock-content {
387 white-space: pre;
388}
389div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
Junio C Hamano1a4e8412005-12-27 08:17:23392}
393
394div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
397}
Junio C Hamanoba4b9282008-07-06 05:20:31398
399/* IE6 sets dynamically generated links as visited. */
400div#toc a:visited { color: blue; }
Junio C Hamano1a4e8412005-12-27 08:17:23401</style>
Junio C Hamano1a4e8412005-12-27 08:17:23402</head>
403<body>
404<div id="header">
405<h1>
406git-show-branch(1) Manual Page
407</h1>
408<h2>NAME</h2>
409<div class="sectionbody">
410<p>git-show-branch -
Junio C Hamano01078922006-03-10 00:31:47411 Show branches and their commits
Junio C Hamano1a4e8412005-12-27 08:17:23412</p>
413</div>
414</div>
Junio C Hamano68cf15a2010-11-06 01:01:59415<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23416<div class="sectionbody">
Junio C Hamano38064d52006-01-15 10:13:49417<div class="verseblock">
Junio C Hamano68cf15a2010-11-06 01:01:59418<div class="verseblock-content"><em>git show-branch</em> [-a|--all] [-r|--remotes] [--topo-order | --date-order]
Junio C Hamano4aa0bcc2010-03-03 05:13:12419 [--current] [--color[=&lt;when&gt;] | --no-color] [--sparse]
Junio C Hamano2bb13102006-03-06 07:10:21420 [--more=&lt;n&gt; | --list | --independent | --merge-base]
Junio C Hamanocca56612009-06-03 08:27:33421 [--no-name | --sha1-name] [--topics]
Junio C Hamano15567bc2011-07-23 00:51:59422 [(&lt;rev&gt; | &lt;glob&gt;)&#8230;]
423<em>git show-branch</em> (-g|--reflog)[=&lt;n&gt;[,&lt;base&gt;]] [--list] [&lt;ref&gt;]</div>
Junio C Hamano68cf15a2010-11-06 01:01:59424<div class="verseblock-attribution">
425</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23426</div>
Junio C Hamanoba4b9282008-07-06 05:20:31427<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23428<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59429<div class="paragraph"><p>Shows the commit ancestry graph starting from the commits named
Junio C Hamano4fdccb22010-02-19 09:58:14430with &lt;rev&gt;s or &lt;globs&gt;s (or all refs under refs/heads
431and/or refs/tags) semi-visually.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59432<div class="paragraph"><p>It cannot show more than 29 branches and commits at a time.</p></div>
433<div class="paragraph"><p>It uses <tt>showbranch.default</tt> multi-valued configuration items if
Junio C Hamanoba4b9282008-07-06 05:20:31434no &lt;rev&gt; nor &lt;glob&gt; is given on the command line.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23435</div>
Junio C Hamanoba4b9282008-07-06 05:20:31436<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23437<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59438<div class="dlist"><dl>
439<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23440&lt;rev&gt;
441</dt>
442<dd>
443<p>
Junio C Hamanoc27b7332010-10-14 04:37:28444 Arbitrary extended SHA1 expression (see <a href="gitrevisions.html">gitrevisions(7)</a>)
Junio C Hamano54bf1e22008-12-20 06:30:11445 that typically names a branch head or a tag.
Junio C Hamano1a4e8412005-12-27 08:17:23446</p>
447</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59448<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23449&lt;glob&gt;
450</dt>
451<dd>
452<p>
453 A glob pattern that matches branch or tag names under
Junio C Hamano4fdccb22010-02-19 09:58:14454 refs/. For example, if you have many topic
455 branches under refs/heads/topic, giving
Junio C Hamano1a4e8412005-12-27 08:17:23456 <tt>topic/*</tt> would show all of them.
457</p>
458</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59459<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47460-r
461</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59462<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47463--remotes
Junio C Hamano1a4e8412005-12-27 08:17:23464</dt>
465<dd>
466<p>
Junio C Hamano30e1db12006-12-23 10:29:52467 Show the remote-tracking branches.
468</p>
469</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59470<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47471-a
472</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59473<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47474--all
Junio C Hamano30e1db12006-12-23 10:29:52475</dt>
476<dd>
477<p>
478 Show both remote-tracking branches and local branches.
Junio C Hamano1a4e8412005-12-27 08:17:23479</p>
480</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59481<dt class="hdlist1">
Junio C Hamano38064d52006-01-15 10:13:49482--current
483</dt>
484<dd>
485<p>
486 With this option, the command includes the current
487 branch to the list of revs to be shown when it is not
488 given on the command line.
489</p>
490</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59491<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23492--topo-order
493</dt>
494<dd>
495<p>
496 By default, the branches and their commits are shown in
497 reverse chronological order. This option makes them
498 appear in topological order (i.e., descendant commits
499 are shown before their parents).
500</p>
501</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59502<dt class="hdlist1">
Junio C Hamanocca56612009-06-03 08:27:33503--date-order
504</dt>
505<dd>
506<p>
507 This option is similar to <em>--topo-order</em> in the sense that no
508 parent comes before all of its children, but otherwise commits
509 are ordered according to their commit date.
510</p>
511</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59512<dt class="hdlist1">
Junio C Hamano872c5682006-07-07 06:05:40513--sparse
514</dt>
515<dd>
516<p>
517 By default, the output omits merges that are reachable
518 from only one tip being shown. This option makes them
519 visible.
520</p>
521</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59522<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23523--more=&lt;n&gt;
524</dt>
525<dd>
526<p>
527 Usually the command stops output upon showing the commit
528 that is the common ancestor of all the branches. This
529 flag tells the command to go &lt;n&gt; more common commits
530 beyond that. When &lt;n&gt; is negative, display only the
531 &lt;reference&gt;s given, without showing the commit ancestry
532 tree.
533</p>
534</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59535<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23536--list
537</dt>
538<dd>
539<p>
Junio C Hamano38064d52006-01-15 10:13:49540 Synonym to <tt>--more=-1</tt>
Junio C Hamano1a4e8412005-12-27 08:17:23541</p>
542</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59543<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23544--merge-base
545</dt>
546<dd>
547<p>
Junio C Hamanofd9274d2009-08-05 21:21:39548 Instead of showing the commit list, determine possible
549 merge bases for the specified commits. All merge bases
550 will be contained in all specified commits. This is
551 different from how <a href="git-merge-base.html">git-merge-base(1)</a> handles
552 the case of three or more commits.
Junio C Hamano1a4e8412005-12-27 08:17:23553</p>
554</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59555<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23556--independent
557</dt>
558<dd>
559<p>
560 Among the &lt;reference&gt;s given, display only the ones that
561 cannot be reached from any other &lt;reference&gt;.
562</p>
563</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59564<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23565--no-name
566</dt>
567<dd>
568<p>
569 Do not show naming strings for each commit.
570</p>
571</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59572<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23573--sha1-name
574</dt>
575<dd>
576<p>
577 Instead of naming the commits using the path to reach
578 them from heads (e.g. "master~2" to mean the grandparent
579 of "master"), name them with the unique prefix of their
580 object names.
581</p>
582</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59583<dt class="hdlist1">
Junio C Hamano52401ef2006-12-19 00:54:38584--topics
585</dt>
586<dd>
587<p>
588 Shows only commits that are NOT on the first branch given.
589 This helps track topic branches by hiding any commit that
590 is already in the main line of development. When given
591 "git show-branch --topics master topic1 topic2", this
Junio C Hamano6926bef2007-06-16 09:54:05592 will show the revisions given by "git rev-list &#94;master
Junio C Hamano52401ef2006-12-19 00:54:38593 topic1 topic2"
594</p>
595</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59596<dt class="hdlist1">
Junio C Hamanoa3bb6eb2009-02-05 01:26:33597-g
598</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59599<dt class="hdlist1">
Junio C Hamano16cf1582007-02-05 07:21:48600--reflog[=&lt;n&gt;[,&lt;base&gt;]] [&lt;ref&gt;]
Junio C Hamanod793de52006-12-26 09:11:43601</dt>
602<dd>
603<p>
Junio C Hamanodb450ba2007-01-21 08:57:14604 Shows &lt;n&gt; most recent ref-log entries for the given
605 ref. If &lt;base&gt; is given, &lt;n&gt; entries going back from
Junio C Hamanofa0d4cf2007-01-25 02:23:58606 that entry. &lt;base&gt; can be specified as count or date.
Junio C Hamanoa3bb6eb2009-02-05 01:26:33607 When no explicit &lt;ref&gt; parameter is given, it defaults to the
Junio C Hamano16cf1582007-02-05 07:21:48608 current branch (or <tt>HEAD</tt> if it is detached).
Junio C Hamanod793de52006-12-26 09:11:43609</p>
610</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59611<dt class="hdlist1">
Junio C Hamano4aa0bcc2010-03-03 05:13:12612--color[=&lt;when&gt;]
Junio C Hamano52ba2952009-05-18 17:43:02613</dt>
614<dd>
615<p>
616 Color the status sign (one of these: <tt>*</tt> <tt>!</tt> <tt>+</tt> <tt>-</tt>) of each commit
Junio C Hamano68cf15a2010-11-06 01:01:59617 corresponding to the branch it&#8217;s in.
Junio C Hamano4aa0bcc2010-03-03 05:13:12618 The value must be always (the default), never, or auto.
Junio C Hamano52ba2952009-05-18 17:43:02619</p>
620</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59621<dt class="hdlist1">
Junio C Hamano52ba2952009-05-18 17:43:02622--no-color
623</dt>
624<dd>
625<p>
626 Turn off colored output, even when the configuration file gives the
627 default to color output.
Junio C Hamano4aa0bcc2010-03-03 05:13:12628 Same as <tt>--color=never</tt>.
Junio C Hamano52ba2952009-05-18 17:43:02629</p>
630</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31631</dl></div>
Junio C Hamano68cf15a2010-11-06 01:01:59632<div class="paragraph"><p>Note that --more, --list, --independent and --merge-base options
Junio C Hamanoba4b9282008-07-06 05:20:31633are mutually exclusive.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23634</div>
Junio C Hamanoba4b9282008-07-06 05:20:31635<h2 id="_output">OUTPUT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23636<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59637<div class="paragraph"><p>Given N &lt;references&gt;, the first N lines are the one-line
Junio C Hamano1a4e8412005-12-27 08:17:23638description from their commit message. The branch head that is
Junio C Hamano38064d52006-01-15 10:13:49639pointed at by $GIT_DIR/HEAD is prefixed with an asterisk <tt>*</tt>
Junio C Hamanoba4b9282008-07-06 05:20:31640character while other heads are prefixed with a <tt>!</tt> character.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59641<div class="paragraph"><p>Following these N lines, one-line log for each commit is
Junio C Hamano1a4e8412005-12-27 08:17:23642displayed, indented N places. If a commit is on the I-th
Junio C Hamano38064d52006-01-15 10:13:49643branch, the I-th indentation character shows a <tt>+</tt> sign;
644otherwise it shows a space. Merge commits are denoted by
645a <tt>-</tt> sign. Each commit shows a short name that
Junio C Hamanoba4b9282008-07-06 05:20:31646can be used as an extended SHA1 to name that commit.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59647<div class="paragraph"><p>The following example shows three branches, "master", "fixes"
Junio C Hamanoba4b9282008-07-06 05:20:31648and "mhf":</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23649<div class="listingblock">
650<div class="content">
651<pre><tt>$ git show-branch master fixes mhf
Junio C Hamano38064d52006-01-15 10:13:49652* [master] Add 'git show-branch'.
Junio C Hamano1a4e8412005-12-27 08:17:23653 ! [fixes] Introduce "reset type" flag to "git reset"
654 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
655---
656 + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
657 + [mhf~1] Use git-octopus when pulling more than one heads.
658 + [fixes] Introduce "reset type" flag to "git reset"
659 + [mhf~2] "git fetch --force".
660 + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
661 + [mhf~4] Make "git pull" and "git fetch" default to origin
662 + [mhf~5] Infamous 'octopus merge'
663 + [mhf~6] Retire git-parse-remote.
664 + [mhf~7] Multi-head fetch.
665 + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
Junio C Hamano38064d52006-01-15 10:13:49666*++ [master] Add 'git show-branch'.</tt></pre>
Junio C Hamano1a4e8412005-12-27 08:17:23667</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59668<div class="paragraph"><p>These three branches all forked from a common commit, [master],
Junio C Hamano2db3e752010-09-03 21:33:06669whose commit message is "Add &#39;git show-branch&#39;".
670The "fixes" branch adds one commit "Introduce "reset type" flag to
671"git reset"". The "mhf" branch adds many other commits.
672The current branch is "master".</p></div>
Junio C Hamano38064d52006-01-15 10:13:49673</div>
Junio C Hamanoba4b9282008-07-06 05:20:31674<h2 id="_example">EXAMPLE</h2>
Junio C Hamano38064d52006-01-15 10:13:49675<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59676<div class="paragraph"><p>If you keep your primary branches immediately under
Junio C Hamano4fdccb22010-02-19 09:58:14677<tt>refs/heads</tt>, and topic branches in subdirectories of
Junio C Hamanoba4b9282008-07-06 05:20:31678it, having the following in the configuration file may help:</p></div>
Junio C Hamano38064d52006-01-15 10:13:49679<div class="listingblock">
680<div class="content">
681<pre><tt>[showbranch]
682 default = --topo-order
Junio C Hamano68cf15a2010-11-06 01:01:59683 default = heads/*</tt></pre>
Junio C Hamano38064d52006-01-15 10:13:49684</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59685<div class="paragraph"><p>With this, <tt>git show-branch</tt> without extra parameters would show
Junio C Hamano38064d52006-01-15 10:13:49686only the primary branches. In addition, if you happen to be on
Junio C Hamanoba4b9282008-07-06 05:20:31687your topic branch, it is shown as well.</p></div>
Junio C Hamanodb450ba2007-01-21 08:57:14688<div class="listingblock">
689<div class="content">
Junio C Hamanof62a11d2008-12-21 12:16:36690<pre><tt>$ git show-branch --reflog="10,1 hour ago" --list master</tt></pre>
Junio C Hamanodb450ba2007-01-21 08:57:14691</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:59692<div class="paragraph"><p>shows 10 reflog entries going back from the tip as of 1 hour ago.
Junio C Hamanodb450ba2007-01-21 08:57:14693Without <tt>--list</tt>, the output also shows how these tips are
Junio C Hamanoba4b9282008-07-06 05:20:31694topologically related with each other.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23695</div>
Junio C Hamanoba4b9282008-07-06 05:20:31696<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23697<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59698<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23699</div>
700<div id="footer">
701<div id="footer-text">
Junio C Hamano15567bc2011-07-23 00:51:59702Last updated 2011-07-23 00:49:30 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23703</div>
704</div>
705</body>
706</html>