Selecting and formatting the git log output
Now that you know how to select revisions to examine and to limit which revisions are shown (selecting those that are interesting), it is time to see how to select which part of information associated with the queried revisions to show, and how to format this output. There is a huge number and variety of options of the git log
command available for this.
Predefined and user defined output formats
A very useful git log
option is --pretty
. This option changes the format of log output. There are a few prebuilt formats available for you to use. The oneline
format prints each commit on a single line, which is useful if you're looking at a lot of commits; there exists --oneline
, shorthand for --pretty=oneline --abbrev-commit
used together. In addition, the short
, medium
(the default), full
, and fuller
formats show the output in roughly the same format, but with less or more information, respectively. The raw
format shows commits in the internal Git representation...