blob: f65f89f2407640afadfa811e565f35173a149bef [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 Hamano2bb13102006-03-06 07:10:216<meta name="generator" content="AsciiDoc 7.0.2" />
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
19a { color: blue; }
20a:visited { color: fuchsia; }
21
22em {
23 font-style: italic;
24}
25
26strong {
27 font-weight: bold;
28}
29
30tt {
31 color: navy;
32}
33
34h1, h2, h3, h4, h5, h6 {
35 color: #527bbd;
36 font-family: sans-serif;
37 margin-top: 1.2em;
38 margin-bottom: 0.5em;
39 line-height: 1.3;
40}
41
42h1 {
43 border-bottom: 2px solid silver;
44}
45h2 {
46 border-bottom: 2px solid silver;
47 padding-top: 0.5em;
48}
49
50div.sectionbody {
51 font-family: serif;
52 margin-left: 0;
53}
54
55hr {
56 border: 1px solid silver;
57}
58
59p {
60 margin-top: 0.5em;
61 margin-bottom: 0.5em;
62}
63
64pre {
65 padding: 0;
66 margin: 0;
67}
68
69span#author {
70 color: #527bbd;
71 font-family: sans-serif;
72 font-weight: bold;
73 font-size: 1.2em;
74}
75span#email {
76}
77span#revision {
78 font-family: sans-serif;
79}
80
81div#footer {
82 font-family: sans-serif;
83 font-size: small;
84 border-top: 2px solid silver;
85 padding-top: 0.5em;
86 margin-top: 4.0em;
87}
88div#footer-text {
89 float: left;
90 padding-bottom: 0.5em;
91}
92div#footer-badges {
93 float: right;
94 padding-bottom: 0.5em;
95}
96
97div#preamble,
98div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
99div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
100div.admonitionblock {
101 margin-right: 10%;
102 margin-top: 1.5em;
103 margin-bottom: 1.5em;
104}
105div.admonitionblock {
106 margin-top: 2.5em;
107 margin-bottom: 2.5em;
108}
109
110div.content { /* Block element content. */
111 padding: 0;
112}
113
114/* Block element titles. */
115div.title, caption.title {
116 font-family: sans-serif;
117 font-weight: bold;
118 text-align: left;
119 margin-top: 1.0em;
120 margin-bottom: 0.5em;
121}
122div.title + * {
123 margin-top: 0;
124}
125
126td div.title:first-child {
127 margin-top: 0.0em;
128}
129div.content div.title:first-child {
130 margin-top: 0.0em;
131}
132div.content + div.title {
133 margin-top: 0.0em;
134}
135
136div.sidebarblock > div.content {
137 background: #ffffee;
138 border: 1px solid silver;
139 padding: 0.5em;
140}
141
142div.listingblock > div.content {
143 border: 1px solid silver;
144 background: #f4f4f4;
145 padding: 0.5em;
146}
147
148div.quoteblock > div.content {
149 padding-left: 2.0em;
150}
151div.quoteblock .attribution {
152 text-align: right;
153}
154
155div.admonitionblock .icon {
156 vertical-align: top;
157 font-size: 1.1em;
158 font-weight: bold;
159 text-decoration: underline;
160 color: #527bbd;
161 padding-right: 0.5em;
162}
163div.admonitionblock td.content {
164 padding-left: 0.5em;
165 border-left: 2px solid silver;
166}
167
168div.exampleblock > div.content {
169 border-left: 2px solid silver;
170 padding: 0.5em;
171}
172
173div.verseblock div.content {
174 white-space: pre;
175}
176
177div.imageblock div.content { padding-left: 0; }
178div.imageblock img { border: 1px solid silver; }
179span.image img { border-style: none; }
180
181dl {
182 margin-top: 0.8em;
183 margin-bottom: 0.8em;
184}
185dt {
186 margin-top: 0.5em;
187 margin-bottom: 0;
188 font-style: italic;
189}
190dd > *:first-child {
191 margin-top: 0;
192}
193
194ul, ol {
195 list-style-position: outside;
196}
197ol.olist2 {
198 list-style-type: lower-alpha;
199}
200
201div.tableblock > table {
202 border-color: #527bbd;
203 border-width: 3px;
204}
205thead {
206 font-family: sans-serif;
207 font-weight: bold;
208}
209tfoot {
210 font-weight: bold;
211}
212
213div.hlist {
214 margin-top: 0.8em;
215 margin-bottom: 0.8em;
216}
217td.hlist1 {
218 vertical-align: top;
219 font-style: italic;
220 padding-right: 0.8em;
221}
222td.hlist2 {
223 vertical-align: top;
224}
225
226@media print {
227 div#footer-badges { display: none; }
228}
229include::./stylesheets/xhtml11-manpage.css[]
230/* Workarounds for IE6's broken and incomplete CSS2. */
231
232div.sidebar-content {
233 background: #ffffee;
234 border: 1px solid silver;
235 padding: 0.5em;
236}
237div.sidebar-title, div.image-title {
238 font-family: sans-serif;
239 font-weight: bold;
240 margin-top: 0.0em;
241 margin-bottom: 0.5em;
242}
243
244div.listingblock div.content {
245 border: 1px solid silver;
246 background: #f4f4f4;
247 padding: 0.5em;
248}
249
250div.quoteblock-content {
251 padding-left: 2.0em;
252}
253
254div.exampleblock-content {
255 border-left: 2px solid silver;
256 padding-left: 0.5em;
257}
258</style>
259<title>git-show-branch(1)</title>
260</head>
261<body>
262<div id="header">
263<h1>
264git-show-branch(1) Manual Page
265</h1>
266<h2>NAME</h2>
267<div class="sectionbody">
268<p>git-show-branch -
Junio C Hamano01078922006-03-10 00:31:47269 Show branches and their commits
Junio C Hamano1a4e8412005-12-27 08:17:23270</p>
271</div>
272</div>
273<h2>SYNOPSIS</h2>
274<div class="sectionbody">
Junio C Hamano38064d52006-01-15 10:13:49275<div class="verseblock">
Junio C Hamano30e1db12006-12-23 10:29:52276<div class="content"><em>git-show-branch</em> [--all] [--remotes] [--topo-order] [--current]
Junio C Hamano2bb13102006-03-06 07:10:21277 [--more=&lt;n&gt; | --list | --independent | --merge-base]
Junio C Hamanod793de52006-12-26 09:11:43278 [--no-name | --sha1-name] [--topics] [&lt;rev&gt; | &lt;glob&gt;]&#8230;
Junio C Hamano16cf1582007-02-05 07:21:48279<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:23280</div>
281<h2>DESCRIPTION</h2>
282<div class="sectionbody">
283<p>Shows the commit ancestry graph starting from the commits named
284with &lt;rev&gt;s or &lt;globs&gt;s (or all refs under $GIT_DIR/refs/heads
285and/or $GIT_DIR/refs/tags) semi-visually.</p>
286<p>It cannot show more than 29 branches and commits at a time.</p>
Junio C Hamano38064d52006-01-15 10:13:49287<p>It uses <tt>showbranch.default</tt> multi-valued configuration items if
288no &lt;rev&gt; nor &lt;glob&gt; is given on the command line.</p>
Junio C Hamano1a4e8412005-12-27 08:17:23289</div>
290<h2>OPTIONS</h2>
291<div class="sectionbody">
292<dl>
293<dt>
294&lt;rev&gt;
295</dt>
296<dd>
297<p>
298 Arbitrary extended SHA1 expression (see <tt>git-rev-parse</tt>)
299 that typically names a branch HEAD or a tag.
300</p>
301</dd>
302<dt>
303&lt;glob&gt;
304</dt>
305<dd>
306<p>
307 A glob pattern that matches branch or tag names under
308 $GIT_DIR/refs. For example, if you have many topic
309 branches under $GIT_DIR/refs/heads/topic, giving
310 <tt>topic/*</tt> would show all of them.
311</p>
312</dd>
313<dt>
Junio C Hamano30e1db12006-12-23 10:29:52314-r|--remotes
Junio C Hamano1a4e8412005-12-27 08:17:23315</dt>
316<dd>
317<p>
Junio C Hamano30e1db12006-12-23 10:29:52318 Show the remote-tracking branches.
319</p>
320</dd>
321<dt>
322-a|--all
323</dt>
324<dd>
325<p>
326 Show both remote-tracking branches and local branches.
Junio C Hamano1a4e8412005-12-27 08:17:23327</p>
328</dd>
329<dt>
Junio C Hamano38064d52006-01-15 10:13:49330--current
331</dt>
332<dd>
333<p>
334 With this option, the command includes the current
335 branch to the list of revs to be shown when it is not
336 given on the command line.
337</p>
338</dd>
339<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23340--topo-order
341</dt>
342<dd>
343<p>
344 By default, the branches and their commits are shown in
345 reverse chronological order. This option makes them
346 appear in topological order (i.e., descendant commits
347 are shown before their parents).
348</p>
349</dd>
350<dt>
Junio C Hamano872c5682006-07-07 06:05:40351--sparse
352</dt>
353<dd>
354<p>
355 By default, the output omits merges that are reachable
356 from only one tip being shown. This option makes them
357 visible.
358</p>
359</dd>
360<dt>
Junio C Hamano1a4e8412005-12-27 08:17:23361--more=&lt;n&gt;
362</dt>
363<dd>
364<p>
365 Usually the command stops output upon showing the commit
366 that is the common ancestor of all the branches. This
367 flag tells the command to go &lt;n&gt; more common commits
368 beyond that. When &lt;n&gt; is negative, display only the
369 &lt;reference&gt;s given, without showing the commit ancestry
370 tree.
371</p>
372</dd>
373<dt>
374--list
375</dt>
376<dd>
377<p>
Junio C Hamano38064d52006-01-15 10:13:49378 Synonym to <tt>--more=-1</tt>
Junio C Hamano1a4e8412005-12-27 08:17:23379</p>
380</dd>
381<dt>
382--merge-base
383</dt>
384<dd>
385<p>
386 Instead of showing the commit list, just act like the
387 <em>git-merge-base -a</em> command, except that it can accept
388 more than two heads.
389</p>
390</dd>
391<dt>
392--independent
393</dt>
394<dd>
395<p>
396 Among the &lt;reference&gt;s given, display only the ones that
397 cannot be reached from any other &lt;reference&gt;.
398</p>
399</dd>
400<dt>
401--no-name
402</dt>
403<dd>
404<p>
405 Do not show naming strings for each commit.
406</p>
407</dd>
408<dt>
409--sha1-name
410</dt>
411<dd>
412<p>
413 Instead of naming the commits using the path to reach
414 them from heads (e.g. "master~2" to mean the grandparent
415 of "master"), name them with the unique prefix of their
416 object names.
417</p>
418</dd>
Junio C Hamano52401ef2006-12-19 00:54:38419<dt>
420--topics
421</dt>
422<dd>
423<p>
424 Shows only commits that are NOT on the first branch given.
425 This helps track topic branches by hiding any commit that
426 is already in the main line of development. When given
427 "git show-branch --topics master topic1 topic2", this
Junio C Hamano6926bef2007-06-16 09:54:05428 will show the revisions given by "git rev-list &#94;master
Junio C Hamano52401ef2006-12-19 00:54:38429 topic1 topic2"
430</p>
431</dd>
Junio C Hamanod793de52006-12-26 09:11:43432<dt>
Junio C Hamano16cf1582007-02-05 07:21:48433--reflog[=&lt;n&gt;[,&lt;base&gt;]] [&lt;ref&gt;]
Junio C Hamanod793de52006-12-26 09:11:43434</dt>
435<dd>
436<p>
Junio C Hamanodb450ba2007-01-21 08:57:14437 Shows &lt;n&gt; most recent ref-log entries for the given
438 ref. If &lt;base&gt; is given, &lt;n&gt; entries going back from
Junio C Hamanofa0d4cf2007-01-25 02:23:58439 that entry. &lt;base&gt; can be specified as count or date.
Junio C Hamano16cf1582007-02-05 07:21:48440 <tt>-g</tt> can be used as a short-hand for this option. When
441 no explicit &lt;ref&gt; parameter is given, it defaults to the
442 current branch (or <tt>HEAD</tt> if it is detached).
Junio C Hamanod793de52006-12-26 09:11:43443</p>
444</dd>
Junio C Hamano1a4e8412005-12-27 08:17:23445</dl>
446<p>Note that --more, --list, --independent and --merge-base options
447are mutually exclusive.</p>
448</div>
449<h2>OUTPUT</h2>
450<div class="sectionbody">
451<p>Given N &lt;references&gt;, the first N lines are the one-line
452description from their commit message. The branch head that is
Junio C Hamano38064d52006-01-15 10:13:49453pointed at by $GIT_DIR/HEAD is prefixed with an asterisk <tt>*</tt>
454character while other heads are prefixed with a <tt>!</tt> character.</p>
Junio C Hamano1a4e8412005-12-27 08:17:23455<p>Following these N lines, one-line log for each commit is
456displayed, indented N places. If a commit is on the I-th
Junio C Hamano38064d52006-01-15 10:13:49457branch, the I-th indentation character shows a <tt>+</tt> sign;
458otherwise it shows a space. Merge commits are denoted by
459a <tt>-</tt> sign. Each commit shows a short name that
Junio C Hamano235a91e2006-01-07 01:13:58460can be used as an extended SHA1 to name that commit.</p>
Junio C Hamano1a4e8412005-12-27 08:17:23461<p>The following example shows three branches, "master", "fixes"
462and "mhf":</p>
463<div class="listingblock">
464<div class="content">
465<pre><tt>$ git show-branch master fixes mhf
Junio C Hamano38064d52006-01-15 10:13:49466* [master] Add 'git show-branch'.
Junio C Hamano1a4e8412005-12-27 08:17:23467 ! [fixes] Introduce "reset type" flag to "git reset"
468 ! [mhf] Allow "+remote:local" refspec to cause --force when fetching.
469---
470 + [mhf] Allow "+remote:local" refspec to cause --force when fetching.
471 + [mhf~1] Use git-octopus when pulling more than one heads.
472 + [fixes] Introduce "reset type" flag to "git reset"
473 + [mhf~2] "git fetch --force".
474 + [mhf~3] Use .git/remote/origin, not .git/branches/origin.
475 + [mhf~4] Make "git pull" and "git fetch" default to origin
476 + [mhf~5] Infamous 'octopus merge'
477 + [mhf~6] Retire git-parse-remote.
478 + [mhf~7] Multi-head fetch.
479 + [mhf~8] Start adding the $GIT_DIR/remotes/ support.
Junio C Hamano38064d52006-01-15 10:13:49480*++ [master] Add 'git show-branch'.</tt></pre>
Junio C Hamano1a4e8412005-12-27 08:17:23481</div></div>
482<p>These three branches all forked from a common commit, [master],
483whose commit message is "Add <em>git show-branch</em>. "fixes" branch
484adds one commit <em>Introduce "reset type"</em>. "mhf" branch has many
Junio C Hamano38064d52006-01-15 10:13:49485other commits. The current branch is "master".</p>
486</div>
487<h2>EXAMPLE</h2>
488<div class="sectionbody">
489<p>If you keep your primary branches immediately under
490<tt>$GIT_DIR/refs/heads</tt>, and topic branches in subdirectories of
491it, having the following in the configuration file may help:</p>
492<div class="listingblock">
493<div class="content">
494<pre><tt>[showbranch]
495 default = --topo-order
496 default = heads/*
497</tt></pre>
498</div></div>
Junio C Hamano2b135272006-03-18 07:45:42499<p>With this, <tt>git show-branch</tt> without extra parameters would show
Junio C Hamano38064d52006-01-15 10:13:49500only the primary branches. In addition, if you happen to be on
501your topic branch, it is shown as well.</p>
Junio C Hamanodb450ba2007-01-21 08:57:14502<div class="listingblock">
503<div class="content">
504<pre><tt>$ git show-branch --reflog='10,1 hour ago' --list master</tt></pre>
505</div></div>
506<p>shows 10 reflog entries going back from the tip as of 1 hour ago.
507Without <tt>--list</tt>, the output also shows how these tips are
508topologically related with each other.</p>
Junio C Hamano1a4e8412005-12-27 08:17:23509</div>
510<h2>Author</h2>
511<div class="sectionbody">
512<p>Written by Junio C Hamano &lt;junkio@cox.net&gt;</p>
513</div>
514<h2>Documentation</h2>
515<div class="sectionbody">
516<p>Documentation by Junio C Hamano.</p>
517</div>
518<h2>GIT</h2>
519<div class="sectionbody">
520<p>Part of the <a href="git.html">git(7)</a> suite</p>
521</div>
522<div id="footer">
523<div id="footer-text">
Junio C Hamano35738e82008-01-07 07:55:46524Last updated 07-Jan-2008 07:50:47 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23525</div>
526</div>
527</body>
528</html>