1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <title> git-log-compact
– log --oneline with who
& when
</title>
4 <style type=
"text/css">
9 font-family: Times
, "Times New Roman", serif
;
25 text-decoration: none
;
30 display: inline-block
;
31 background-color: #e8e8e8;
37 background-color: black
;
42 background-color: black
;
47 background-color: black
;
52 background-color: black
;
57 background-color: black
;
62 background-color: black
;
65 font-family: Menlo
, Monaco
, Consolas
, Courier
, "Courier New", monospace
;
70 background-color: inherit
;
79 font-family: Helvetica
, Arial
, FreeSans
, sans-serif
;
84 list-style-type: none
;
90 list-style-type: none
;
92 ul
.options
> li:before
{
99 ul
.options li
> p
> code:first-child
{
106 background-color: #e0e0e0;
107 zbackground-color: silver
;
124 content: counter
(hdr
, upper-roman
) ". ";
125 counter-increment: hdr
;
138 margin-right: 1ex; */
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>
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>
175 <li>Root commits are identified by
<code>_
</code> on either side of the hash
</li>
178 <p>When
<code>--graph
</code> mode is enabled, the graph output is enhanced as follows:
</p>
181 <li>Breaks are inserted when necessary to avoid parent/child ambiguity
</li>
185 <h2>Installation
</h2>
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 “<span class=
"mono">Raw
</span>” 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
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"
208 <h2>Dates
& Times
</h2>
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 ===
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
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>
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>
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>
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>
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>
287 <p>See
<a href=
"examples.html" title=
"Examples">more example images
</a>.
</p>
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>
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>
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>