]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-rev-list.txt
d7ff519b9097abcfc2c68da6774ef741ca57df27
[thirdparty/git.git] / Documentation / git-rev-list.txt
1 git-rev-list(1)
2 ===============
3
4 NAME
5 ----
6 git-rev-list - Lists commit objects in reverse chronological order
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git rev-list' [<options>] <commit>... [[--] <path>...]
13
14 DESCRIPTION
15 -----------
16
17 :git-rev-list: 1
18 include::rev-list-description.txt[]
19
20 'rev-list' is a very essential Git command, since it
21 provides the ability to build and traverse commit ancestry graphs. For
22 this reason, it has a lot of different options that enables it to be
23 used by commands as different as 'git bisect' and
24 'git repack'.
25
26 OPTIONS
27 -------
28
29 :git-rev-list: 1
30 include::rev-list-options.txt[]
31
32 include::pretty-formats.txt[]
33
34 EXAMPLES
35 --------
36
37 * Print the list of commits reachable from the current branch.
38 +
39 ----------
40 git rev-list HEAD
41 ----------
42
43 * Print the list of commits on this branch, but not present in the
44 upstream branch.
45 +
46 ----------
47 git rev-list @{upstream}..HEAD
48 ----------
49
50 * Format commits with their author and commit message (see also the
51 porcelain linkgit:git-log[1]).
52 +
53 ----------
54 git rev-list --format=medium HEAD
55 ----------
56
57 * Format commits along with their diffs (see also the porcelain
58 linkgit:git-log[1], which can do this in a single process).
59 +
60 ----------
61 git rev-list HEAD |
62 git diff-tree --stdin --format=medium -p
63 ----------
64
65 * Print the list of commits on the current branch that touched any
66 file in the `Documentation` directory.
67 +
68 ----------
69 git rev-list HEAD -- Documentation/
70 ----------
71
72 * Print the list of commits authored by you in the past year, on
73 any branch, tag, or other ref.
74 +
75 ----------
76 git rev-list --author=you@example.com --since=1.year.ago --all
77 ----------
78
79 * Print the list of objects reachable from the current branch (i.e., all
80 commits and the blobs and trees they contain).
81 +
82 ----------
83 git rev-list --objects HEAD
84 ----------
85
86 GIT
87 ---
88 Part of the linkgit:git[1] suite