git log --oneline alternative with dates, times and initials
[git-log-compact.git] / www / index.html
blobf54fd3d078bb6af9441cf4419d720445ec83c22e
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <title> git-log-compact &#x2013; log --oneline with who &amp; when</title>
4 <style type="text/css">
5 /* <![CDATA[ */
6 body {
7 margin: 0;
8 padding: 2pt;
9 font-family: Times, "Times New Roman", serif;
10 counter-reset: hdr;
12 p {
13 margin: 1em 0;
15 div.content {
16 margin: 0 auto;
17 max-width: 100ex;
19 div.image {
20 margin: 1em auto;
21 text-align: center;
23 div.image a {
24 border: 0;
25 text-decoration: none;
26 color: inherit;
28 code {
29 font-size: 85%;
30 display: inline-block;
31 background-color: #e8e8e8;
32 padding: 0 2pt;
34 .bb {
35 font-weight: bold;
36 color: #8080e0;
37 background-color: black;
39 .or {
40 font-weight: normal;
41 color: #cccc00;
42 background-color: black;
44 .gr {
45 font-weight: normal;
46 color: #00cc00;
47 background-color: black;
49 .rd {
50 font-weight: normal;
51 color: #cc0000;
52 background-color: black;
54 .tg {
55 font-weight: bold;
56 color: #e0e080;
57 background-color: black;
59 .wh {
60 font-weight: normal;
61 color: #cccccc;
62 background-color: black;
64 pre, code, .mono {
65 font-family: Menlo, Monaco, Consolas, Courier, "Courier New", monospace;
67 pre code {
68 margin: 0;
69 padding: 0;
70 background-color: inherit;
71 font-size: 90%;
72 display: inline;
74 h1, h2, h3, h4 {
75 margin-top: 2em;
76 margin-bottom: 1em;
78 h1, h2, h3, h4, ul {
79 font-family: Helvetica, Arial, FreeSans, sans-serif;
80 font-weight: normal;
82 ul {
83 font-size: 90%;
84 list-style-type: none;
86 ul > li:before {
87 content: "\2023 ";
89 ul.options {
90 list-style-type: none;
92 ul.options > li:before {
93 content: "";
95 ul.options li p {
96 font-size: 80%;
97 margin-left: 5ex;
99 ul.options li > p > code:first-child {
100 margin-left: -5ex;
101 font-size: 125%;
103 pre {
104 margin: 0 3ex;
105 padding: 1ex;
106 background-color: #e0e0e0;
107 zbackground-color: silver;
109 h1.title {
110 margin-top: 1em;
111 font-size: 200%;
112 text-align: center;
114 p.intro {
115 margin: 1em 8ex;
116 text-align: justify;
117 font-style: italic;
119 h1 {
120 font-size: 150%;
122 h2:before {
123 xcontent: "\2023 ";
124 content: counter(hdr, upper-roman) ". ";
125 counter-increment: hdr;
127 h2 {
128 font-size: 125%;
130 h3 {
131 font-size: 110%;
133 h4 {
134 font-size: 100%;
136 div.text {
137 /* margin-left: 1ex;
138 margin-right: 1ex; */
140 /* ]]> */
141 </style>
142 </head>
143 <body bgcolor="#f8f8ff" text="black" link="red" vlink="maroon" alink="fuchsia">
144 <div class="content">
145 <h1 class="title">git-log-compact</h1>
147 <p class="intro">A compact alternative to <code>git log --oneline</code> that
148 includes dates, times and author and/or committer initials in a space efficient
149 output format. See all the <a href="examples.html" title="Examples">example
150 images</a> together.</p>
152 <div class="image"><a href="examples.html"><img src="git-log-compact.gif" title="git-log-compact example output"/></a></div>
154 <h2>Overview</h2>
156 <div class="text">
157 <p>The <code>git-log-compact</code> script is intended to fill the gap between the
158 <code>--oneline</code> log output format and the <code>--pretty=short</code>/<code>--pretty=medium</code>
159 output formats. It is not strictly a one line per commit output format
160 (but almost) and while it only shows the title of each commit (like the
161 <code>--pretty=short</code> format) it does include author and date information
162 (like the <code>--pretty=medium</code> format) except that timestamps are shown
163 very compactly and author/committer names are shown as initials.</p>
165 <p>This allows one to get a complete view of repository activity in a very
166 compact output format that can show many commits per screen full and is
167 fully compatible with the <code>--graph</code> option.</p>
169 <p>The <code>--notes</code>, <code>--pretty</code> and <code>--format</code> options are not allowed but any
170 other <code>git log</code> options should work fine (especially <code>--graph</code>).</p>
172 <p>In both <code>--graph</code> and non <code>--graph</code> modes:</p>
174 <ul>
175 <li>Root commits are identified by <code>_</code> on either side of the hash</li>
176 </ul>
178 <p>When <code>--graph</code> mode is enabled, the graph output is enhanced as follows:</p>
180 <ul>
181 <li>Breaks are inserted when necessary to avoid parent/child ambiguity</li>
182 </ul>
183 </div>
185 <h2>Installation</h2>
187 <div class="text">
188 <p>Clone the repository from <code>https://github.com/mackyle/git-log-compact.git</code>
189 or just grab the <a href="https://github.com/mackyle/git-log-compact/blob/HEAD/git-log-compact"
190 title="git-log-compact executable file">git-log-compact file directly</a> (click the
191 &#x201c;<span class="mono">Raw</span>&#x201d; link on that page).</p>
193 <p>Put the <code>git-log-compact</code> executable file in one of the directories
194 included in the <code>PATH</code> environment variable.</p>
196 <p>Optionally set a global alias to save typing such as <code>lc</code> like so:</p>
198 <pre><code>git config --global alias.lc log-compact
199 </code></pre>
201 <p>Optionally set global default options such as <code>--two-initials</code> and
202 <code>--abbrev=8</code> like so:</p>
204 <pre><code>git config --global log-compact.defaults "--two-initials --abbrev=8"
205 </code></pre>
206 </div>
208 <h2>Dates &amp; Times</h2>
210 <div class="text">
211 <p>Dates and times are shown in the local timezone. Set the TZ variable
212 before running <code>git log-compact</code> (e.g. <code>TZ=UTC git log-compact</code> to show
213 dates and times in UTC) or use the <code>--time-zone=</code> option (e.g.
214 <code>git log-compact --time-zone=UTC</code>) to change that.</p>
216 <p>Dates are shown on a date line all by themselves like so:</p>
218 <pre class="bb"><code>=== 2015-11-13 ===
219 </code></pre>
221 <p>The date line indicates that the times on all the following lines
222 (regardless of whether or not <code>--reverse</code> is being used) up until
223 the next date line take place on the indicated date. For example
224 this output:</p>
226 <pre class="bb"><code>=== 2015-09-28 ===
227 <span class="or">be08dee9 </span><span class="gr">13:18 </span><span class="rd">jc </span><span class="or">(</span><span class="tg">tag: v2.6.0</span><span class="or">) </span><span class="wh">Git 2.6</span>
228 === 2015-09-21 ===
229 <span class="or">8d530c4d </span><span class="gr">13:26 </span><span class="rd">jc </span><span class="or">(</span><span class="tg">tag: v2.6.0-rc3</span><span class="or">) </span><span class="wh">Git 2.6-rc3</span>
230 <span class="or">904f6e7c </span><span class="gr">10:51 </span><span class="rd">bn </span><span class="wh">send-email: fix uninitialized var warning for $smtp_auth</span>
231 === 2015-09-20 ===
232 <span class="or">18a21c19 </span><span class="gr">09:49 </span><span class="rd">ps </span><span class="wh">l10n: de.po: better language for one string</span>
233 <span class="or">2e0f3663 </span><span class="gr">09:49 </span><span class="rd">rt </span><span class="wh">l10n: de.po: translate 2 messages</span>
234 <span class="or">5fc31c1f </span><span class="gr">09:44 </span><span class="rd">tq </span><span class="wh">l10n: Update and review Vietnamese translation</span>
235 </code></pre>
237 <p>shows one commit on 2015-09-28, two commits on 2015-09-21 and three
238 commits on 2015-09-20.</p>
240 <p>Note that a date line may appear more than once for the same date
241 (this is especially common when using <code>--graph</code> with its defualt
242 <code>--topo-order</code>).</p>
244 <p>The purpose of a date line is to indicate what date has been elided
245 from the following lines, nothing more.</p>
246 </div>
248 <h2>Examples</h2>
250 <div class="text">
251 <p>See all the <a href="examples.html" title="Examples">example images</a> together.</p>
252 <p>For example, running <code>git log-compact --decorate --graph -n 17 v2.6.1</code>
253 on the Git repository produces this output (which will be colorized
254 on the terminal if color is enabled):</p>
256 <div class="image"><a href="examples.html"><img src="image1.gif" title="git-log-compact example output"/></a></div>
258 <p>The output will be colorized according to the same settings used to enable/
259 disable color for git log output.</p>
261 <p>Additionally, the color of the three new items (dates, times and
262 initials) can be controlled with the <code>color.log-compact.date</code>,
263 <code>color.log-compact.time</code> and <code>color.log-compact.initials</code> config options.</p>
265 <p>Running <code>git log-compact --graph --max-parents=0</code> on the Git repository gives:</p>
267 <div class="image"><a href="examples.html"><img src="image3.gif" title="git-log-compact example output"/></a></div>
269 <p>Notice the <code>_</code> on either side of the hash identifying those commits
270 as root commits. The <code>_</code> will only appear on the left side of the
271 hash if the selected output format would have normally included a
272 space there. In <code>--graph</code> mode, all the spaces between the commit mark
273 (e.g. <code>*</code>) and the hash are turned into <code>_</code>.</p>
275 <p>Running <code>git log-compact --decorate --graph --no-merges -n 13 v2.6.1</code>
276 on the Git repository results in this output:</p>
278 <div class="image"><a href="examples.html"><img src="image2.gif" title="git-log-compact example output"/></a></div>
280 <p>Notice how four linear breaks (<code>..........</code>) were automatically
281 inserted to avoid parent child relationship confusion.</p>
283 <p>In non <code>--graph</code> mode, linear breaks are NOT automatically inserted.
284 They must be requested with the usual <code>--show-linear-break</code> option.</p>
285 </div>
287 <p>See <a href="examples.html" title="Examples">more example images</a>.</p>
289 <h2>Options</h2>
291 <div class="text">
292 <p>In addition to allowing all the normal <code>git log</code> options except for
293 <code>--notes</code>, <code>--format</code> and <code>--pretty</code> (<code>--oneline</code> is allowed and
294 silently ignored), the following additional options may be utilized:</p>
296 <ul class="options">
297 <li><p><code>--seconds</code> <br />
298 include seconds in the time (i.e. HH:MM:SS instead of just HH:MM)</p></li>
299 <li><p><code>--minutes</code> <br />
300 include minutes but not seconds in the time (i.e. HH:MM not HH:MM:SS) <br />
301 This is the default</p></li>
302 <li><p><code>--no-times</code> <br />
303 omit the time field entirely</p></li>
304 <li><p><code>--two-initials</code> <br />
305 only show at most two initials instead of the usual three <br />
306 This is the default if <code>--initials=author,committer</code> or
307 <code>--initials=committer,author</code> is used.</p></li>
308 <li><p><code>--three-initials</code> <br />
309 show at most three initials <br />
310 This is the default unless <code>--initials=author,committer</code> or
311 <code>--initials=committer,author</code> is used.</p></li>
312 <li><p><code>--no-initials</code> <br />
313 omit the initials field entirely</p></li>
314 <li><p><code>--commit-message</code> <br />
315 when using <code>--walk-reflogs</code> show commit message not reflog message</p></li>
316 <li><p><code>--author-date</code> <br />
317 force use of author dates and times <br />
318 The default is to use committer dates and times unless
319 <code>--author-date-order</code> is in effect. This option forces author
320 dates and times to always be used and overrides <code>--committer-date</code>.</p></li>
321 <li><p><code>--committer-date</code> <br />
322 force use of committer dates and times <br />
323 The default is to use committer dates and times if <code>--date-order</code> or
324 <code>--topo-order</code> is in effect or <code>--author-date-order</code> is NOT in effect.
325 This option forces committer dates and times to always be used and
326 overrides a previous <code>--author-date</code> option.</p></li>
327 <li><p><code>--initials=author</code> <br />
328 show author initials <br />
329 This is the default behavior</p></li>
330 <li><p><code>--initials=committer</code> <br />
331 show committer initials instead of author initials</p></li>
332 <li><p><code>--initials=author,committer</code> <br />
333 show author and commiter initials separated by a <code>/</code> <br />
334 This changes the initials width default from three to two.</p></li>
335 <li><p><code>--initials=committer,author</code> <br />
336 show commiter and author initials separated by a <code>/</code> <br />
337 This changes the initials width default from three to two.</p></li>
338 <li><p><code>--time-zone=zone</code> <br />
339 set the TZ environment variable to <code>zone</code> <br />
340 This is an alterative to setting TZ before running <code>git log-compact</code>
341 and will affect the time zone dates and times are displayed in.</p></li>
342 <li><p><code>--weekday</code> <br />
343 show the weekday with the date</p></li>
344 <li><p><code>--no-weekday</code> <br />
345 do not show the weekday with the date <br />
346 This is the default behavior</p></li>
347 </ul>
349 <p>In addition to the above options, color output is controlled as normal
350 for <code>git log</code> with the addition of <code>color.log-compact.date</code>,
351 <code>color.log-compact.time</code> and <code>color.log-compact.initials</code> config options
352 to alter the default colors for dates, times and initials respectively.</p>
354 <p>Furthermore, default options may be set in the <code>log-compact.defaults</code>
355 config value and they will be treated as though they appeared at
356 the very beginning of the <code>git log-compact</code> command line option list
357 (e.g. <code>git config log-compact.defaults "--abbrev=8 --seconds"</code>).</p>
358 </div>
360 </div>
361 </body>
362 </html>