1GIT-WHATCHANGED(1)                Git Manual                GIT-WHATCHANGED(1)
2
3
4

NAME

6       git-whatchanged - Show logs with difference each commit introduces
7

SYNOPSIS

9       git whatchanged <option>...
10

DESCRIPTION

12       Shows commit logs and diff output each commit introduces. The command
13       internally invokes git rev-list piped to git diff-tree, and takes
14       command line options for both of these commands.
15
16       This manual page describes only the most frequently used options.
17

OPTIONS

19       -p
20           Show textual diffs, instead of the git internal diff output format
21           that is useful only to tell the changed paths and their nature of
22           changes.
23
24       -<n>
25           Limit output to <n> commits.
26
27       <since>..<until>
28           Limit output to between the two named commits (bottom exclusive,
29           top inclusive).
30
31       -r
32           Show git internal diff output, but for the whole tree, not just the
33           top level.
34
35       -m
36           By default, differences for merge commits are not shown. With this
37           flag, show differences to that commit from all of its parents.
38
39           However, it is not very useful in general, although it is useful on
40           a file-by-file basis.
41
42       --pretty[=<format>], --format[=<format>]
43           Pretty-print the contents of the commit logs in a given format,
44           where <format> can be one of oneline, short, medium, full, fuller,
45           email, raw and format:<string>. When omitted, the format defaults
46           to medium.
47
48           Note: you can specify the default pretty format in the repository
49           configuration (see git-config(1)).
50
51       --abbrev-commit
52           Instead of showing the full 40-byte hexadecimal commit object name,
53           show only a partial prefix. Non default number of digits can be
54           specified with "--abbrev=<n>" (which also modifies diff output, if
55           it is displayed).
56
57           This should make "--pretty=oneline" a whole lot more readable for
58           people using 80-column terminals.
59
60       --oneline
61           This is a shorthand for "--pretty=oneline --abbrev-commit" used
62           together.
63
64       --encoding[=<encoding>]
65           The commit objects record the encoding used for the log message in
66           their encoding header; this option can be used to tell the command
67           to re-code the commit log message in the encoding preferred by the
68           user. For non plumbing commands this defaults to UTF-8.
69
70       --no-notes, --show-notes[=<ref>]
71           Show the notes (see git-notes(1)) that annotate the commit, when
72           showing the commit log message. This is the default for git log,
73           git show and git whatchanged commands when there is no --pretty,
74           --format nor --oneline option is given on the command line.
75
76           With an optional argument, add this ref to the list of notes. The
77           ref is taken to be in refs/notes/ if it is not qualified.
78
79       --[no-]standard-notes
80           Enable or disable populating the notes ref list from the
81           core.notesRef and notes.displayRef variables (or corresponding
82           environment overrides). Enabled by default. See git-config(1).
83

PRETTY FORMATS

85       If the commit is a merge, and if the pretty-format is not oneline,
86       email or raw, an additional line is inserted before the Author: line.
87       This line begins with "Merge: " and the sha1s of ancestral commits are
88       printed, separated by spaces. Note that the listed commits may not
89       necessarily be the list of the direct parent commits if you have
90       limited your view of history: for example, if you are only interested
91       in changes related to a certain directory or file.
92
93       Here are some additional details for each format:
94
95       ·    oneline
96
97               <sha1> <title line>
98
99           This is designed to be as compact as possible.
100
101       ·    short
102
103               commit <sha1>
104               Author: <author>
105
106               <title line>
107
108       ·    medium
109
110               commit <sha1>
111               Author: <author>
112               Date:   <author date>
113
114               <title line>
115
116               <full commit message>
117
118       ·    full
119
120               commit <sha1>
121               Author: <author>
122               Commit: <committer>
123
124               <title line>
125
126               <full commit message>
127
128       ·    fuller
129
130               commit <sha1>
131               Author:     <author>
132               AuthorDate: <author date>
133               Commit:     <committer>
134               CommitDate: <committer date>
135
136               <title line>
137
138               <full commit message>
139
140       ·    email
141
142               From <sha1> <date>
143               From: <author>
144               Date: <author date>
145               Subject: [PATCH] <title line>
146
147               <full commit message>
148
149       ·    raw
150
151           The raw format shows the entire commit exactly as stored in the
152           commit object. Notably, the SHA1s are displayed in full, regardless
153           of whether --abbrev or --no-abbrev are used, and parents
154           information show the true parent commits, without taking grafts nor
155           history simplification into account.
156
157       ·    format:
158
159           The format: format allows you to specify which information you want
160           to show. It works a little bit like printf format, with the notable
161           exception that you get a newline with %n instead of \n.
162
163           E.g, format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"
164           would show something like this:
165
166               The author of fe6e0ee was Junio C Hamano, 23 hours ago
167               The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
168
169           The placeholders are:
170
171           ·    %H: commit hash
172
173           ·    %h: abbreviated commit hash
174
175           ·    %T: tree hash
176
177           ·    %t: abbreviated tree hash
178
179           ·    %P: parent hashes
180
181           ·    %p: abbreviated parent hashes
182
183           ·    %an: author name
184
185           ·    %aN: author name (respecting .mailmap, see git-shortlog(1) or
186               git-blame(1))
187
188           ·    %ae: author email
189
190           ·    %aE: author email (respecting .mailmap, see git-shortlog(1) or
191               git-blame(1))
192
193           ·    %ad: author date (format respects --date= option)
194
195           ·    %aD: author date, RFC2822 style
196
197           ·    %ar: author date, relative
198
199           ·    %at: author date, UNIX timestamp
200
201           ·    %ai: author date, ISO 8601 format
202
203           ·    %cn: committer name
204
205           ·    %cN: committer name (respecting .mailmap, see git-shortlog(1)
206               or git-blame(1))
207
208           ·    %ce: committer email
209
210           ·    %cE: committer email (respecting .mailmap, see git-shortlog(1)
211               or git-blame(1))
212
213           ·    %cd: committer date
214
215           ·    %cD: committer date, RFC2822 style
216
217           ·    %cr: committer date, relative
218
219           ·    %ct: committer date, UNIX timestamp
220
221           ·    %ci: committer date, ISO 8601 format
222
223           ·    %d: ref names, like the --decorate option of git-log(1)
224
225           ·    %e: encoding
226
227           ·    %s: subject
228
229           ·    %f: sanitized subject line, suitable for a filename
230
231           ·    %b: body
232
233           ·    %N: commit notes
234
235           ·    %gD: reflog selector, e.g., refs/stash@{1}
236
237           ·    %gd: shortened reflog selector, e.g., stash@{1}
238
239           ·    %gs: reflog subject
240
241           ·    %Cred: switch color to red
242
243           ·    %Cgreen: switch color to green
244
245           ·    %Cblue: switch color to blue
246
247           ·    %Creset: reset color
248
249           ·    %C(...): color specification, as described in color.branch.*
250               config option
251
252           ·    %m: left, right or boundary mark
253
254           ·    %n: newline
255
256           ·    %%: a raw %
257
258           ·    %x00: print a byte from a hex code
259
260           ·    %w([<w>[,<i1>[,<i2>]]]): switch line wrapping, like the -w
261               option of git-shortlog(1).
262
263           Note
264           Some placeholders may depend on other options given to the revision
265           traversal engine. For example, the %g* reflog options will insert
266           an empty string unless we are traversing reflog entries (e.g., by
267           git log -g). The %d placeholder will use the "short" decoration
268           format if --decorate was not already provided on the command line.
269
270       If you add a + (plus sign) after % of a placeholder, a line-feed is
271       inserted immediately before the expansion if and only if the
272       placeholder expands to a non-empty string.
273
274       If you add a - (minus sign) after % of a placeholder, line-feeds that
275       immediately precede the expansion are deleted if and only if the
276       placeholder expands to an empty string.
277
278       ·    tformat:
279
280           The tformat: format works exactly like format:, except that it
281           provides "terminator" semantics instead of "separator" semantics.
282           In other words, each commit has the message terminator character
283           (usually a newline) appended, rather than a separator placed
284           between entries. This means that the final entry of a single-line
285           format will be properly terminated with a new line, just as the
286           "oneline" format does. For example:
287
288               $ git log -2 --pretty=format:%h 4da45bef \
289                 | perl -pe ´$_ .= " -- NO NEWLINE\n" unless /\n/´
290               4da45be
291               7134973 -- NO NEWLINE
292
293               $ git log -2 --pretty=tformat:%h 4da45bef \
294                 | perl -pe ´$_ .= " -- NO NEWLINE\n" unless /\n/´
295               4da45be
296               7134973
297
298           In addition, any unrecognized string that has a % in it is
299           interpreted as if it has tformat: in front of it. For example,
300           these two are equivalent:
301
302               $ git log -2 --pretty=tformat:%h 4da45bef
303               $ git log -2 --pretty=%h 4da45bef
304
305

EXAMPLES

307       git whatchanged -p v2.6.12.. include/scsi drivers/scsi
308           Show as patches the commits since version v2.6.12 that changed any
309           file in the include/scsi or drivers/scsi subdirectories
310
311       git whatchanged --since="2 weeks ago" -- gitk
312           Show the changes during the last two weeks to the file gitk. The
313           "--" is necessary to avoid confusion with the branch named gitk
314

AUTHOR

316       Written by Linus Torvalds <torvalds@osdl.org[1]> and Junio C Hamano
317       <gitster@pobox.com[2]>
318

DOCUMENTATION

320       Documentation by David Greaves, Junio C Hamano and the git-list
321       <git@vger.kernel.org[3]>.
322

GIT

324       Part of the git(1) suite
325

NOTES

327        1. torvalds@osdl.org
328           mailto:torvalds@osdl.org
329
330        2. gitster@pobox.com
331           mailto:gitster@pobox.com
332
333        3. git@vger.kernel.org
334           mailto:git@vger.kernel.org
335
336
337
338Git 1.7.1                         08/16/2017                GIT-WHATCHANGED(1)
Impressum