Home Explore Blog CI



git

2nd chunk of `Documentation/git-log.adoc`
94113eeed1314d48878a499fd1d7d20cae6392e9feb7c26100000001000008ad
 <path>...` shows commits that
	touch the specified paths, and diffs about the same specified
	paths.  With this, the full diff is shown for commits that touch
	the specified paths; this means that "<path>..." limits only
	commits, and doesn't limit diff for those commits.
+
Note that this affects all diff-based output types, e.g. those
produced by `--stat`, etc.

--log-size::
	Include a line ``log size <number>'' in the output for each commit,
	where <number> is the length of that commit's message in bytes.
	Intended to speed up tools that read log messages from `git log`
	output by allowing them to allocate space in advance.

include::line-range-options.adoc[]

<revision-range>::
	Show only commits in the specified revision range.  When no
	<revision-range> is specified, it defaults to `HEAD` (i.e. the
	whole history leading to the current commit).  `origin..HEAD`
	specifies all the commits reachable from the current commit
	(i.e. `HEAD`), but not from `origin`. For a complete list of
	ways to spell <revision-range>, see the 'Specifying Ranges'
	section of linkgit:gitrevisions[7].

[--] <path>...::
	Show only commits that are enough to explain how the files
	that match the specified paths came to be.  See 'History
	Simplification' below for details and other simplification
	modes.
+
Paths may need to be prefixed with `--` to separate them from
options or the revision range, when confusion arises.

include::rev-list-options.adoc[]

include::pretty-formats.adoc[]

DIFF FORMATTING
---------------

By default, `git log` does not generate any diff output. The options
below can be used to show the changes made by each commit.

Note that unless one of `--diff-merges` variants (including short
`-m`, `-c`, `--cc`, and `--dd` options) is explicitly given, merge commits
will not show a diff, even if a diff format like `--patch` is
selected, nor will they match search options like `-S`. The exception
is when `--first-parent` is in use, in which case `first-parent` is
the default format for merge commits.

:git-log: 1
:diff-merges-default: `off`
include::diff-options.adoc[]

include::diff-generate-patch.adoc[]

EXAMPLES
--------
`git log --no-merges`::

	Show the whole commit history, but skip

Title: Git Log Options and Formatting
Summary
The git-log command provides various options to control the output and formatting of commit logs, including options to show full diffs, limit commits to specific paths, and customize the display of commit information, as well as options to simplify commit history and generate patches, allowing users to tailor the output to their specific needs and workflows.