]> Pileus Git - ~andy/git/blob - Documentation/git-log.txt
git-log(1): remove --full-line-diff description
[~andy/git] / Documentation / git-log.txt
1 git-log(1)
2 ==========
3
4 NAME
5 ----
6 git-log - Show commit logs
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git log' [<options>] [<since>..<until>] [[\--] <path>...]
13
14 DESCRIPTION
15 -----------
16 Shows the commit logs.
17
18 The command takes options applicable to the 'git rev-list'
19 command to control what is shown and how, and options applicable to
20 the 'git diff-*' commands to control how the changes
21 each commit introduces are shown.
22
23
24 OPTIONS
25 -------
26
27 <since>..<until>::
28         Show only commits between the named two commits.  When
29         either <since> or <until> is omitted, it defaults to
30         `HEAD`, i.e. the tip of the current branch.
31         For a more complete list of ways to spell <since>
32         and <until>, see linkgit:gitrevisions[7].
33
34 --follow::
35         Continue listing the history of a file beyond renames
36         (works only for a single file).
37
38 --no-decorate::
39 --decorate[=short|full|no]::
40         Print out the ref names of any commits that are shown. If 'short' is
41         specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
42         'refs/remotes/' will not be printed. If 'full' is specified, the
43         full ref name (including prefix) will be printed. The default option
44         is 'short'.
45
46 --source::
47         Print out the ref name given on the command line by which each
48         commit was reached.
49
50 --use-mailmap::
51         Use mailmap file to map author and committer names and email
52         to canonical real names and email addresses. See
53         linkgit:git-shortlog[1].
54
55 --full-diff::
56         Without this flag, "git log -p <path>..." shows commits that
57         touch the specified paths, and diffs about the same specified
58         paths.  With this, the full diff is shown for commits that touch
59         the specified paths; this means that "<path>..." limits only
60         commits, and doesn't limit diff for those commits.
61 +
62 Note that this affects all diff-based output types, e.g. those
63 produced by --stat etc.
64
65 --log-size::
66         Before the log message print out its size in bytes. Intended
67         mainly for porcelain tools consumption. If Git is unable to
68         produce a valid value size is set to zero.
69         Note that only message is considered, if also a diff is shown
70         its size is not included.
71
72 -L <start>,<end>:<file>, -L :<regex>:<file>::
73
74         Trace the evolution of the line range given by "<start>,<end>"
75         (or the funcname regex <regex>) within the <file>.  You may
76         not give any pathspec limiters.  This is currently limited to
77         a walk starting from a single revision, i.e., you may only
78         give zero or one positive revision arguments.
79         You can specify this option more than once.
80 +
81 <start> and <end> can take one of these forms:
82
83 include::line-range-format.txt[]
84
85 [\--] <path>...::
86         Show only commits that are enough to explain how the files
87         that match the specified paths came to be.  See "History
88         Simplification" below for details and other simplification
89         modes.
90 +
91 To prevent confusion with options and branch names, paths may need to
92 be prefixed with "\-- " to separate them from options or refnames.
93
94 include::rev-list-options.txt[]
95
96 include::pretty-formats.txt[]
97
98 Common diff options
99 -------------------
100
101 :git-log: 1
102 include::diff-options.txt[]
103
104 include::diff-generate-patch.txt[]
105
106 Examples
107 --------
108 `git log --no-merges`::
109
110         Show the whole commit history, but skip any merges
111
112 `git log v2.6.12.. include/scsi drivers/scsi`::
113
114         Show all commits since version 'v2.6.12' that changed any file
115         in the include/scsi or drivers/scsi subdirectories
116
117 `git log --since="2 weeks ago" -- gitk`::
118
119         Show the changes during the last two weeks to the file 'gitk'.
120         The "--" is necessary to avoid confusion with the *branch* named
121         'gitk'
122
123 `git log --name-status release..test`::
124
125         Show the commits that are in the "test" branch but not yet
126         in the "release" branch, along with the list of paths
127         each commit modifies.
128
129 `git log --follow builtin-rev-list.c`::
130
131         Shows the commits that changed builtin-rev-list.c, including
132         those commits that occurred before the file was given its
133         present name.
134
135 `git log --branches --not --remotes=origin`::
136
137         Shows all commits that are in any of local branches but not in
138         any of remote-tracking branches for 'origin' (what you have that
139         origin doesn't).
140
141 `git log master --not --remotes=*/master`::
142
143         Shows all commits that are in local master but not in any remote
144         repository master branches.
145
146 `git log -p -m --first-parent`::
147
148         Shows the history including change diffs, but only from the
149         "main branch" perspective, skipping commits that come from merged
150         branches, and showing full diffs of changes introduced by the merges.
151         This makes sense only when following a strict policy of merging all
152         topic branches when staying on a single integration branch.
153
154 git log -L '/int main/',/^}/:main.c::
155
156         Shows how the function `main()` in the file 'main.c' evolved
157         over time.
158
159 `git log -3`::
160         Limits the number of commits to show to 3.
161
162 Discussion
163 ----------
164
165 include::i18n.txt[]
166
167 Configuration
168 -------------
169
170 See linkgit:git-config[1] for core variables and linkgit:git-diff[1]
171 for settings related to diff generation.
172
173 format.pretty::
174         Default for the `--format` option.  (See "PRETTY FORMATS" above.)
175         Defaults to "medium".
176
177 i18n.logOutputEncoding::
178         Encoding to use when displaying logs.  (See "Discussion", above.)
179         Defaults to the value of `i18n.commitEncoding` if set, UTF-8
180         otherwise.
181
182 log.date::
183         Default format for human-readable dates.  (Compare the
184         `--date` option.)  Defaults to "default", which means to write
185         dates like `Sat May 8 19:35:34 2010 -0500`.
186
187 log.showroot::
188         If `false`, 'git log' and related commands will not treat the
189         initial commit as a big creation event.  Any root commits in
190         `git log -p` output would be shown without a diff attached.
191         The default is `true`.
192
193 mailmap.*::
194         See linkgit:git-shortlog[1].
195
196 notes.displayRef::
197         Which refs, in addition to the default set by `core.notesRef`
198         or 'GIT_NOTES_REF', to read notes from when showing commit
199         messages with the 'log' family of commands.  See
200         linkgit:git-notes[1].
201 +
202 May be an unabbreviated ref name or a glob and may be specified
203 multiple times.  A warning will be issued for refs that do not exist,
204 but a glob that does not match any refs is silently ignored.
205 +
206 This setting can be disabled by the `--no-notes` option,
207 overridden by the 'GIT_NOTES_DISPLAY_REF' environment variable,
208 and overridden by the `--notes=<ref>` option.
209
210 GIT
211 ---
212 Part of the linkgit:git[1] suite