blob: 5ec547cc0c10fb940b1bd2481940997cd375e830 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-log(1)
2==========
3
4NAME
5----
6git-log - Show commit logs
7
8
9SYNOPSIS
10--------
11'git-log' <option>...
12
13DESCRIPTION
14-----------
Junio C Hamanoba7c8d82006-04-15 06:17:4215Shows the commit logs.
Junio C Hamano1a4e8412005-12-27 08:17:2316
Junio C Hamanoc8d88c22006-04-29 07:02:0117The command takes options applicable to the gitlink:git-rev-list[1]
Junio C Hamanoba7c8d82006-04-15 06:17:4218command to control what is shown and how, and options applicable to
Junio C Hamanod3339982007-02-09 08:38:4819the gitlink:git-diff-tree[1] commands to control how the changes
Junio C Hamanoba7c8d82006-04-15 06:17:4220each commit introduces are shown.
21
Junio C Hamanoc8d88c22006-04-29 07:02:0122This manual page describes only the most frequently used options.
Junio C Hamanoba7c8d82006-04-15 06:17:4223
Junio C Hamano1a4e8412005-12-27 08:17:2324
25OPTIONS
26-------
Junio C Hamanoa340aaa2006-11-23 02:47:3327
Junio C Hamano0430e3a2007-05-15 03:13:1728include::pretty-options.txt[]
Junio C Hamano1a4e8412005-12-27 08:17:2329
Junio C Hamanoedd2b0a2007-01-15 06:12:4530-<n>::
Junio C Hamano1a4e8412005-12-27 08:17:2331Limits the number of commits to show.
32
33<since>..<until>::
Junio C Hamano775a0f42006-12-31 01:19:1434Show only commits between the named two commits. When
35either <since> or <until> is omitted, it defaults to
36`HEAD`, i.e. the tip of the current branch.
Junio C Hamano2d47c622007-01-18 06:24:1037For a more complete list of ways to spell <since>
38and <until>, see "SPECIFYING REVISIONS" section in
39gitlink:git-rev-parse[1].
Junio C Hamano1a4e8412005-12-27 08:17:2340
Junio C Hamanoeb69cbf2007-03-28 00:59:1041--first-parent::
42Follow only the first parent commit upon seeing a merge
43commit. This option gives a better overview of the
44evolution of a particular branch.
45
Junio C Hamanoba7c8d82006-04-15 06:17:4246-p::
47Show the change the commit introduces in a patch form.
48
Junio C Hamano29ee1632007-04-16 01:28:4849-g, \--walk-reflogs::
50Show commits as they were recorded in the reflog. The log contains
51a record about how the tip of a reference was changed.
Junio C Hamanocae86272007-08-21 02:20:4952Cannot be combined with --reverse.
Junio C Hamano29ee1632007-04-16 01:28:4853See also gitlink:git-reflog[1].
54
Junio C Hamanoea5dae62007-05-10 23:25:0855--decorate::
Junio C Hamanoee695f22007-06-21 00:35:3656Print out the ref names of any commits that are shown.
57
58--full-diff::
59Without this flag, "git log -p <paths>..." shows commits that
60touch the specified paths, and diffs about the same specified
61paths. With this, the full diff is shown for commits that touch
62the specified paths; this means that "<paths>..." limits only
63commits, and doesn't limit diff for those commits.
Junio C Hamanoea5dae62007-05-10 23:25:0864
Junio C Hamano235d53f2007-07-13 00:25:1565--follow::
66Continue listing the history of a file beyond renames.
67
Junio C Hamano024b6c62007-08-14 09:43:0868--log-size::
69Before the log message print out its size in bytes. Intended
70mainly for porcelain tools consumption. If git is unable to
71produce a valid value size is set to zero.
72Note that only message is considered, if also a diff is shown
73its size is not included.
74
Junio C Hamanoba7c8d82006-04-15 06:17:4275<paths>...::
76Show only commits that affect the specified paths.
77
Junio C Hamano1a4e8412005-12-27 08:17:2378
Junio C Hamano0430e3a2007-05-15 03:13:1779include::pretty-formats.txt[]
80
81
Junio C Hamano1a4e8412005-12-27 08:17:2382Examples
83--------
84git log --no-merges::
85
86Show the whole commit history, but skip any merges
87
88git log v2.6.12.. include/scsi drivers/scsi::
89
90Show all commits since version 'v2.6.12' that changed any file
91in the include/scsi or drivers/scsi subdirectories
92
Junio C Hamano1bb569e2006-05-05 23:14:2593git log --since="2 weeks ago" \-- gitk::
Junio C Hamano1a4e8412005-12-27 08:17:2394
95Show the changes during the last two weeks to the file 'gitk'.
96The "--" is necessary to avoid confusion with the *branch* named
97'gitk'
98
Junio C Hamano7d9e9bd2007-08-29 07:31:4799git log --name-status release..test::
Junio C Hamanoba7c8d82006-04-15 06:17:42100
101Show the commits that are in the "test" branch but not yet
102in the "release" branch, along with the list of paths
103each commit modifies.
Junio C Hamano1a4e8412005-12-27 08:17:23104
Junio C Hamano235d53f2007-07-13 00:25:15105git log --follow builtin-rev-list.c::
106
107Shows the commits that changed builtin-rev-list.c, including
108those commits that occurred before the file was given its
109present name.
110
Junio C Hamano775a0f42006-12-31 01:19:14111Discussion
112----------
113
114include::i18n.txt[]
115
116
Junio C Hamano1a4e8412005-12-27 08:17:23117Author
118------
119Written by Linus Torvalds <torvalds@osdl.org>
120
121Documentation
122--------------
123Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
124
125GIT
126---
127Part of the gitlink:git[7] suite