Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-log(1) |
| 2 | ========== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-log - Show commit logs |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
| 11 | 'git-log' <option>... |
| 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 15 | Shows the commit logs. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 16 | |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 17 | The command takes options applicable to the gitlink:git-rev-list[1] |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 18 | command to control what is shown and how, and options applicable to |
Junio C Hamano | d333998 | 2007-02-09 08:38:48 | [diff] [blame] | 19 | the gitlink:git-diff-tree[1] commands to control how the changes |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 20 | each commit introduces are shown. |
| 21 | |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 22 | This manual page describes only the most frequently used options. |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 23 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | |
| 25 | OPTIONS |
| 26 | ------- |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 27 | |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 28 | include::pretty-options.txt[] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 29 | |
Junio C Hamano | edd2b0a | 2007-01-15 06:12:45 | [diff] [blame] | 30 | -<n>:: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 31 | Limits the number of commits to show. |
| 32 | |
| 33 | <since>..<until>:: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 34 | Show only commits between the named two commits. When |
| 35 | either <since> or <until> is omitted, it defaults to |
| 36 | `HEAD`, i.e. the tip of the current branch. |
Junio C Hamano | 2d47c62 | 2007-01-18 06:24:10 | [diff] [blame] | 37 | For a more complete list of ways to spell <since> |
| 38 | and <until>, see "SPECIFYING REVISIONS" section in |
| 39 | gitlink:git-rev-parse[1]. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 40 | |
Junio C Hamano | eb69cbf | 2007-03-28 00:59:10 | [diff] [blame] | 41 | --first-parent:: |
| 42 | Follow only the first parent commit upon seeing a merge |
| 43 | commit. This option gives a better overview of the |
| 44 | evolution of a particular branch. |
| 45 | |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 46 | -p:: |
| 47 | Show the change the commit introduces in a patch form. |
| 48 | |
Junio C Hamano | 29ee163 | 2007-04-16 01:28:48 | [diff] [blame] | 49 | -g, \--walk-reflogs:: |
| 50 | Show commits as they were recorded in the reflog. The log contains |
| 51 | a record about how the tip of a reference was changed. |
Junio C Hamano | cae8627 | 2007-08-21 02:20:49 | [diff] [blame] | 52 | Cannot be combined with --reverse. |
Junio C Hamano | 29ee163 | 2007-04-16 01:28:48 | [diff] [blame] | 53 | See also gitlink:git-reflog[1]. |
| 54 | |
Junio C Hamano | ea5dae6 | 2007-05-10 23:25:08 | [diff] [blame] | 55 | --decorate:: |
Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 56 | Print out the ref names of any commits that are shown. |
| 57 | |
| 58 | --full-diff:: |
| 59 | Without this flag, "git log -p <paths>..." shows commits that |
| 60 | touch the specified paths, and diffs about the same specified |
| 61 | paths. With this, the full diff is shown for commits that touch |
| 62 | the specified paths; this means that "<paths>..." limits only |
| 63 | commits, and doesn't limit diff for those commits. |
Junio C Hamano | ea5dae6 | 2007-05-10 23:25:08 | [diff] [blame] | 64 | |
Junio C Hamano | 235d53f | 2007-07-13 00:25:15 | [diff] [blame] | 65 | --follow:: |
| 66 | Continue listing the history of a file beyond renames. |
| 67 | |
Junio C Hamano | 024b6c6 | 2007-08-14 09:43:08 | [diff] [blame] | 68 | --log-size:: |
| 69 | Before the log message print out its size in bytes. Intended |
| 70 | mainly for porcelain tools consumption. If git is unable to |
| 71 | produce a valid value size is set to zero. |
| 72 | Note that only message is considered, if also a diff is shown |
| 73 | its size is not included. |
| 74 | |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 75 | <paths>...:: |
| 76 | Show only commits that affect the specified paths. |
| 77 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 78 | |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 79 | include::pretty-formats.txt[] |
| 80 | |
| 81 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 82 | Examples |
| 83 | -------- |
| 84 | git log --no-merges:: |
| 85 | |
| 86 | Show the whole commit history, but skip any merges |
| 87 | |
| 88 | git log v2.6.12.. include/scsi drivers/scsi:: |
| 89 | |
| 90 | Show all commits since version 'v2.6.12' that changed any file |
| 91 | in the include/scsi or drivers/scsi subdirectories |
| 92 | |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 93 | git log --since="2 weeks ago" \-- gitk:: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | |
| 95 | Show the changes during the last two weeks to the file 'gitk'. |
| 96 | The "--" is necessary to avoid confusion with the *branch* named |
| 97 | 'gitk' |
| 98 | |
Junio C Hamano | 7d9e9bd | 2007-08-29 07:31:47 | [diff] [blame^] | 99 | git log --name-status release..test:: |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 100 | |
| 101 | Show the commits that are in the "test" branch but not yet |
| 102 | in the "release" branch, along with the list of paths |
| 103 | each commit modifies. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 104 | |
Junio C Hamano | 235d53f | 2007-07-13 00:25:15 | [diff] [blame] | 105 | git log --follow builtin-rev-list.c:: |
| 106 | |
| 107 | Shows the commits that changed builtin-rev-list.c, including |
| 108 | those commits that occurred before the file was given its |
| 109 | present name. |
| 110 | |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 111 | Discussion |
| 112 | ---------- |
| 113 | |
| 114 | include::i18n.txt[] |
| 115 | |
| 116 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 117 | Author |
| 118 | ------ |
| 119 | Written by Linus Torvalds <torvalds@osdl.org> |
| 120 | |
| 121 | Documentation |
| 122 | -------------- |
| 123 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 124 | |
| 125 | GIT |
| 126 | --- |
| 127 | Part of the gitlink:git[7] suite |