blob: 3ecad5f35499ec0b7c5c0f1c2ee816fd1f8506e8 [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 Hamanoba4b9282008-07-06 05:20:316<meta name="generator" content="AsciiDoc 8.2.5" />
Junio C Hamano1a4e8412005-12-27 08:17:237<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
Junio C Hamanoba4b9282008-07-06 05:20:3119a {
20 color: blue;
21 text-decoration: underline;
22}
23a:visited {
24 color: fuchsia;
25}
Junio C Hamano1a4e8412005-12-27 08:17:2326
27em {
28 font-style: italic;
29}
30
31strong {
32 font-weight: bold;
33}
34
35tt {
36 color: navy;
37}
38
39h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
45}
46
Junio C Hamanoba4b9282008-07-06 05:20:3147h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2348 border-bottom: 2px solid silver;
49}
50h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2351 padding-top: 0.5em;
52}
Junio C Hamanoba4b9282008-07-06 05:20:3153h3 {
54 float: left;
55}
56h3 + * {
57 clear: left;
58}
Junio C Hamano1a4e8412005-12-27 08:17:2359
60div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
63}
64
65hr {
66 border: 1px solid silver;
67}
68
69p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
72}
73
74pre {
75 padding: 0;
76 margin: 0;
77}
78
79span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3183 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:2384}
85span#email {
86}
87span#revision {
88 font-family: sans-serif;
89}
90
91div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
97}
98div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
101}
102div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
105}
106
107div#preamble,
108div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
114}
115div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
118}
119
120div.content { /* Block element content. */
121 padding: 0;
122}
123
124/* Block element titles. */
125div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
131}
132div.title + * {
133 margin-top: 0;
134}
135
136td div.title:first-child {
137 margin-top: 0.0em;
138}
139div.content div.title:first-child {
140 margin-top: 0.0em;
141}
142div.content + div.title {
143 margin-top: 0.0em;
144}
145
146div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
150}
151
Junio C Hamanoba4b9282008-07-06 05:20:31152div.listingblock {
153 margin-right: 0%;
154}
Junio C Hamano1a4e8412005-12-27 08:17:23155div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
159}
160
161div.quoteblock > div.content {
162 padding-left: 2.0em;
163}
Junio C Hamanoba4b9282008-07-06 05:20:31164
165div.attribution {
Junio C Hamano1a4e8412005-12-27 08:17:23166 text-align: right;
167}
Junio C Hamanoba4b9282008-07-06 05:20:31168div.verseblock + div.attribution {
169 text-align: left;
170}
Junio C Hamano1a4e8412005-12-27 08:17:23171
172div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
179}
180div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
183}
184
185div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
188}
189
190div.verseblock div.content {
191 white-space: pre;
192}
193
194div.imageblock div.content { padding-left: 0; }
195div.imageblock img { border: 1px solid silver; }
196span.image img { border-style: none; }
197
198dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
201}
202dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
206}
207dd > *:first-child {
208 margin-top: 0;
209}
210
211ul, ol {
212 list-style-position: outside;
213}
Junio C Hamanoba4b9282008-07-06 05:20:31214div.olist2 ol {
Junio C Hamano1a4e8412005-12-27 08:17:23215 list-style-type: lower-alpha;
216}
217
218div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31219 border: 3px solid #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23220}
221thead {
222 font-family: sans-serif;
223 font-weight: bold;
224}
225tfoot {
226 font-weight: bold;
227}
228
229div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
Junio C Hamanoba4b9282008-07-06 05:20:31233div.hlist td {
234 padding-bottom: 5px;
235}
Junio C Hamano1a4e8412005-12-27 08:17:23236td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
240}
241td.hlist2 {
242 vertical-align: top;
243}
244
245@media print {
246 div#footer-badges { display: none; }
247}
Junio C Hamanoba4b9282008-07-06 05:20:31248
249div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
256}
257
258div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
261}
262div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
265}
266div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
269}
270div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
273}
274include1::./stylesheets/xhtml11-manpage.css[]
Junio C Hamano1a4e8412005-12-27 08:17:23275/* Workarounds for IE6's broken and incomplete CSS2. */
276
277div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
281}
282div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
287}
288
289div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
293}
294
295div.quoteblock-content {
296 padding-left: 2.0em;
297}
298
299div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
302}
Junio C Hamanoba4b9282008-07-06 05:20:31303
304/* IE6 sets dynamically generated links as visited. */
305div#toc a:visited { color: blue; }
Junio C Hamano1a4e8412005-12-27 08:17:23306</style>
307<title>git-show-branch(1)</title>
308</head>
309<body>
310<div id="header">
311<h1>
312git-show-branch(1) Manual Page
313</h1>
314<h2>NAME</h2>
315<div class="sectionbody">
316<p>git-show-branch -
Junio C Hamano01078922006-03-10 00:31:47317 Show branches and their commits
Junio C Hamano1a4e8412005-12-27 08:17:23318</p>
319</div>
320</div>
321<h2>SYNOPSIS</h2>
322<div class="sectionbody">
Junio C Hamano38064d52006-01-15 10:13:49323<div class="verseblock">
Junio C Hamanofce7c7e2008-07-02 03:06:38324<div class="content"><em>git show-branch</em> [--all] [--remotes] [--topo-order] [--current]
Junio C Hamano2bb13102006-03-06 07:10:21325 [--more=&lt;n&gt; | --list | --independent | --merge-base]
Junio C Hamanod793de52006-12-26 09:11:43326 [--no-name | --sha1-name] [--topics] [&lt;rev&gt; | &lt;glob&gt;]&#8230;
Junio C Hamanofce7c7e2008-07-02 03:06:38327<em>git show-branch</em> (-g|--reflog)[=&lt;n&gt;[,&lt;base&gt;]] [--list] [&lt;ref&gt;]</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23328</div>
Junio C Hamanoba4b9282008-07-06 05:20:31329<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23330<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31331<div class="para"><p>Shows the commit ancestry graph starting from the commits named
Junio C Hamano1a4e8412005-12-27 08:17:23332with &lt;rev&gt;s or &lt;globs&gt;s (or all refs under $GIT_DIR/refs/heads
Junio C Hamanoba4b9282008-07-06 05:20:31333and/or $GIT_DIR/refs/tags) semi-visually.</p></div>
334<div class="para"><p>It cannot show more than 29 branches and commits at a time.</p></div>
335<div class="para"><p>It uses <tt>showbranch.default</tt> multi-valued configuration items if
336no &lt;rev&gt; nor &lt;glob&gt; is given on the command line.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23337</div>
Junio C Hamanoba4b9282008-07-06 05:20:31338<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23339<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31340<div class="vlist"><dl>
Junio C Hamano1a4e8412005-12-27 08:17:23341<dt>
342&lt;rev&gt;
343</dt>
344<dd>
345<p>
Junio C Hamanofce7c7e2008-07-02 03:06:38346 Arbitrary extended SHA1 expression (see <a href="git-rev-parse.html">git-rev-parse(1)</a>)
Junio C Hamano1a4e8412005-12-27 08:17:23347 that typically names a branch HEAD or a tag.
348</p>
349</dd>
350<dt>
351&lt;glob&gt;
352</dt>
353<dd>
354<p>
355 A glob pattern that matches branch or tag names under
356 $GIT_DIR/refs. For example, if you have many topic
357 branches under $GIT_DIR/refs/heads/topic, giving
358 <tt>topic/*</tt> would show all of them.
359</p>
360</dd>
361<dt>
Junio C Hamanoeb415992008-06-08 22:49:47362-r
363</dt>
364<dt>
365--remotes
Junio C Hamano1a4e8412005-12-27 08:17:23366</dt>
367<dd>
368<p>
Junio C Hamano30e1db12006-12-23 10:29:52369 Show the remote-tracking branches.
370</p>
371</dd>
372<dt>
Junio C Hamanoeb415992008-06-08 22:49:47373-a
374</dt>
375<dt>
376--all
Junio C Hamano30e1db12006-12-23 10:29:52377</dt>
378<dd>
379<p>
380 Show both remote-tracking branches and local branches.
Junio C Hamano1a4e8412005-12-27 08:17:23381</p>
382</dd>
383<dt>
Junio C Hamano38064d52006-01-15 10:13:49384--current
385</dt>
386<dd>
387<p>
388 With this option, the command includes the current
389 branch to the list of revs to be shown when it is not
390 given on the command line.
391</p>
392</dd>
393<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23394--topo-order
395</dt>
396<dd>
397<p>
398 By default, the branches and their commits are shown in
399 reverse chronological order. This option makes them
400 appear in topological order (i.e., descendant commits
401 are shown before their parents).
402</p>
403</dd>
404<dt>
Junio C Hamano872c5682006-07-07 06:05:40405--sparse
406</dt>
407<dd>
408<p>
409 By default, the output omits merges that are reachable
410 from only one tip being shown. This option makes them
411 visible.
412</p>
413</dd>
414<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23415--more=&lt;n&gt;
416</dt>
417<dd>
418<p>
419 Usually the command stops output upon showing the commit
420 that is the common ancestor of all the branches. This
421 flag tells the command to go &lt;n&gt; more common commits
422 beyond that. When &lt;n&gt; is negative, display only the
423 &lt;reference&gt;s given, without showing the commit ancestry
424 tree.
425</p>
426</dd>
427<dt>
428--list
429</dt>
430<dd>
431<p>
Junio C Hamano38064d52006-01-15 10:13:49432 Synonym to <tt>--more=-1</tt>
Junio C Hamano1a4e8412005-12-27 08:17:23433</p>
434</dd>
435<dt>
436--merge-base
437</dt>
438<dd>
439<p>
440 Instead of showing the commit list, just act like the
Junio C Hamanoba4b9282008-07-06 05:20:31441 <em>git-merge-base -a</em> command, except that it can accept
Junio C Hamano1a4e8412005-12-27 08:17:23442 more than two heads.
443</p>
444</dd>
445<dt>
446--independent
447</dt>
448<dd>
449<p>
450 Among the &lt;reference&gt;s given, display only the ones that
451 cannot be reached from any other &lt;reference&gt;.
452</p>
453</dd>
454<dt>
455--no-name
456</dt>
457<dd>
458<p>
459 Do not show naming strings for each commit.
460</p>
461</dd>
462<dt>
463--sha1-name
464</dt>
465<dd>
466<p>
467 Instead of naming the commits using the path to reach
468 them from heads (e.g. "master~2" to mean the grandparent
469 of "master"), name them with the unique prefix of their
470 object names.
471</p>
472</dd>
Junio C Hamano52401ef2006-12-19 00:54:38473<dt>
474--topics
475</dt>
476<dd>
477<p>
478 Shows only commits that are NOT on the first branch given.
479 This helps track topic branches by hiding any commit that
480 is already in the main line of development. When given
481 "git show-branch --topics master topic1 topic2", this
Junio C Hamano6926bef2007-06-16 09:54:05482 will show the revisions given by "git rev-list &#94;master
Junio C Hamano52401ef2006-12-19 00:54:38483 topic1 topic2"
484</p>
485</dd>
Junio C Hamanod793de52006-12-26 09:11:43486<dt>
Junio C Hamano16cf1582007-02-05 07:21:48487--reflog[=&lt;n&gt;[,&lt;base&gt;]] [&lt;ref&gt;]
Junio C Hamanod793de52006-12-26 09:11:43488</dt>
489<dd>
490<p>
Junio C Hamanodb450ba2007-01-21 08:57:14491 Shows &lt;n&gt; most recent ref-log entries for the given
492 ref. If &lt;base&gt; is given, &lt;n&gt; entries going back from
Junio C Hamanofa0d4cf2007-01-25 02:23:58493 that entry. &lt;base&gt; can be specified as count or date.
Junio C Hamano16cf1582007-02-05 07:21:48494 <tt>-g</tt> can be used as a short-hand for this option. When
495 no explicit &lt;ref&gt; parameter is given, it defaults to the
496 current branch (or <tt>HEAD</tt> if it is detached).
Junio C Hamanod793de52006-12-26 09:11:43497</p>
498</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31499</dl></div>
500<div class="para"><p>Note that --more, --list, --independent and --merge-base options
501are mutually exclusive.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23502</div>
Junio C Hamanoba4b9282008-07-06 05:20:31503<h2 id="_output">OUTPUT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23504<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31505<div class="para"><p>Given N &lt;references&gt;, the first N lines are the one-line
Junio C Hamano1a4e8412005-12-27 08:17:23506description from their commit message. The branch head that is
Junio C Hamano38064d52006-01-15 10:13:49507pointed at by $GIT_DIR/HEAD is prefixed with an asterisk <tt>*</tt>
Junio C Hamanoba4b9282008-07-06 05:20:31508character while other heads are prefixed with a <tt>!</tt> character.</p></div>
509<div class="para"><p>Following these N lines, one-line log for each commit is
Junio C Hamano1a4e8412005-12-27 08:17:23510displayed, indented N places. If a commit is on the I-th
Junio C Hamano38064d52006-01-15 10:13:49511branch, the I-th indentation character shows a <tt>+</tt> sign;
512otherwise it shows a space. Merge commits are denoted by
513a <tt>-</tt> sign. Each commit shows a short name that
Junio C Hamanoba4b9282008-07-06 05:20:31514can be used as an extended SHA1 to name that commit.</p></div>
515<div class="para"><p>The following example shows three branches, "master", "fixes"
516and "mhf":</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23517<div class="listingblock">
518<div class="content">
519<pre><tt>$ git show-branch master fixes mhf
Junio C Hamano38064d52006-01-15 10:13:49520* [master] Add 'git show-branch'.
Junio C Hamano1a4e8412005-12-27 08:17:23521 ! [fixes] Introduce "reset type" flag to "git reset"
522 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
523---
524 + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
525 + [mhf~1] Use git-octopus when pulling more than one heads.
526 + [fixes] Introduce "reset type" flag to "git reset"
527 + [mhf~2] "git fetch --force".
528 + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
529 + [mhf~4] Make "git pull" and "git fetch" default to origin
530 + [mhf~5] Infamous 'octopus merge'
531 + [mhf~6] Retire git-parse-remote.
532 + [mhf~7] Multi-head fetch.
533 + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
Junio C Hamano38064d52006-01-15 10:13:49534*++ [master] Add 'git show-branch'.</tt></pre>
Junio C Hamano1a4e8412005-12-27 08:17:23535</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31536<div class="para"><p>These three branches all forked from a common commit, [master],
Junio C Hamano1a4e8412005-12-27 08:17:23537whose commit message is "Add <em>git show-branch</em>. "fixes" branch
538adds one commit <em>Introduce "reset type"</em>. "mhf" branch has many
Junio C Hamanoba4b9282008-07-06 05:20:31539other commits. The current branch is "master".</p></div>
Junio C Hamano38064d52006-01-15 10:13:49540</div>
Junio C Hamanoba4b9282008-07-06 05:20:31541<h2 id="_example">EXAMPLE</h2>
Junio C Hamano38064d52006-01-15 10:13:49542<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31543<div class="para"><p>If you keep your primary branches immediately under
Junio C Hamano38064d52006-01-15 10:13:49544<tt>$GIT_DIR/refs/heads</tt>, and topic branches in subdirectories of
Junio C Hamanoba4b9282008-07-06 05:20:31545it, having the following in the configuration file may help:</p></div>
Junio C Hamano38064d52006-01-15 10:13:49546<div class="listingblock">
547<div class="content">
548<pre><tt>[showbranch]
549 default = --topo-order
550 default = heads/*
551</tt></pre>
552</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31553<div class="para"><p>With this, <tt>git show-branch</tt> without extra parameters would show
Junio C Hamano38064d52006-01-15 10:13:49554only the primary branches. In addition, if you happen to be on
Junio C Hamanoba4b9282008-07-06 05:20:31555your topic branch, it is shown as well.</p></div>
Junio C Hamanodb450ba2007-01-21 08:57:14556<div class="listingblock">
557<div class="content">
558<pre><tt>$ git show-branch --reflog='10,1 hour ago' --list master</tt></pre>
559</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31560<div class="para"><p>shows 10 reflog entries going back from the tip as of 1 hour ago.
Junio C Hamanodb450ba2007-01-21 08:57:14561Without <tt>--list</tt>, the output also shows how these tips are
Junio C Hamanoba4b9282008-07-06 05:20:31562topologically related with each other.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23563</div>
Junio C Hamanoba4b9282008-07-06 05:20:31564<h2 id="_author">Author</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23565<div class="sectionbody">
Junio C Hamano0868a302008-07-22 09:20:44566<div class="para"><p>Written by Junio C Hamano &lt;gitster@pobox.com&gt;</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23567</div>
Junio C Hamanoba4b9282008-07-06 05:20:31568<h2 id="_documentation">Documentation</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23569<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31570<div class="para"><p>Documentation by Junio C Hamano.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23571</div>
Junio C Hamanoba4b9282008-07-06 05:20:31572<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23573<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31574<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23575</div>
576<div id="footer">
577<div id="footer-text">
Junio C Hamano0868a302008-07-22 09:20:44578Last updated 2008-07-22 09:19:16 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23579</div>
580</div>
581</body>
582</html>