๐ŸŒ
Git
git-scm.com โ€บ docs โ€บ git-log
Git - git-log Documentation
Using more options generally further limits the output (e.g. --since=<date1> limits to commits newer than <date1>, and using it with --grep=<pattern> further limits to commits whose log message has a line that matches <pattern>), unless otherwise noted.
๐ŸŒ
Nicoespeon
nicoespeon.com โ€บ en โ€บ 2020 โ€บ 10 โ€บ how-to-export-git-history-pdf
How to export git history in PDF โ€” @nicoespeon's blog
git --no-pager log --graph --all --oneline > git-history.txt ยท Then, you can either convert that .txt into a PDF using an online service (if data is not sensitive): http://www.convertfiles.com/converter.php ยท Or you can use libreoffice if ...
Discussions

formatting - The shortest possible output from Git log, containing author and date - Stack Overflow
How can I show a Git log output with (at least) the following information? author commit date change I want it compressed to one line per log entry. What's the shortest possible format for that? (I More on stackoverflow.com
๐ŸŒ stackoverflow.com
What is the difference between git log and git show?
git show is primarily for showing a single commit. It defaults to a verbose display, including the entire diff. It can also show other, non-commit objects. git log is primarily for showing a range of commits. It defaults to only showing the commit message, and can be reduced to one line. Both take similar options for the format. You can, with an appropriate command line, persuade git log to display a single commit with full diff just like git show. More on reddit.com
๐ŸŒ r/git
3
7
March 29, 2015
My favorite alias for git log
[alias] lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative More on reddit.com
๐ŸŒ r/git
17
108
February 5, 2024
How to set no pager with "git log" when showing just a few entries?
Git has a --no-pager option, so you can set an alias like git slog (short log) for short listings. Alternatively, if you're using less as you pager, you can set it up instead. Put the following in your shell config file: export LESS="${LESS:+$LESS }-X -F" and less will only prompt you on output longer than one screen. More on reddit.com
๐ŸŒ r/git
10
3
August 4, 2023
People also ask

What is Git Log?
Git log is a command in Git that displays the commit history of a repository, including details such as author, date, and commit message.
๐ŸŒ
hatica.io
hatica.io โ€บ blog โ€บ git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
How to see Git Logs?
Navigate to your Git repository in the terminal, and run git log -n to view the commit history and understand the changes made over time.
๐ŸŒ
hatica.io
hatica.io โ€บ blog โ€บ git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
๐ŸŒ
Atlassian
atlassian.com โ€บ git โ€บ tutorials โ€บ git-log
Advanced Git Log | Atlassian Git Tutorial
January 12, 2026 - The complete list of placeholders can be found in the Pretty Formats section of the git log manual page. Aside from letting you view only the information that youโ€™re interested in, the --pretty=format:"<string>" option is particularly useful when youโ€™re trying to pipe git log output into another command.
๐ŸŒ
Devhints
devhints.io โ€บ git โ€บ git log cheatsheet
git log cheatsheet
The one-page guide to git log: usage, examples, links, snippets, and more.
๐ŸŒ
Git
git-scm.com โ€บ book โ€บ en โ€บ v2 โ€บ Git-Basics-Viewing-the-Commit-History
2.3 Git Basics - Viewing the Commit History
For example, if you want to see some abbreviated stats for each commit, you can use the --stat option: $ git log --stat commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 Change version number Rakefile | 2 +- 1 file ...
๐ŸŒ
W3docs
w3docs.com โ€บ learn-git โ€บ git-log.html
Git Log - How To Use Git Log | W3Docs Git Tutorial
On this page you will find information about git log command and its usage, as well as find the common options and see examples with brief explanation.
๐ŸŒ
Linux Kernel
kernel.org โ€บ pub โ€บ software โ€บ scm โ€บ git โ€บ docs โ€บ git-log.html
git-log(1) Manual Page
August 25, 2025 - See the description of the --diff-filter option on what the status letters mean. Just like --name-only the file names are often encoded in UTF-8. ... Specify how differences in submodules are shown. When specifying --submodule=short the short format is used. This format just shows the names of the commits at the beginning and end of the range. When --submodule or --submodule=log is specified, the log format is used. This format lists the commits in the range like git-submodule(1) summary does.
Find elsewhere
๐ŸŒ
Linux Man Pages
linux.die.net โ€บ man โ€บ 1 โ€บ git-log
git-log(1): commit logs - Linux man page
Shows the commit logs. The command takes options applicable to the git rev-list command to control what is shown and how, and options applicable to the git diff-* commands to control how the changes each commit introduces are shown.
๐ŸŒ
CodingNomads
codingnomads.com โ€บ git-log
Git Log
Below are the different ways you can use the git log command. You can make the information for each commit fit into a single line. This way, you can view deeper into your repo's history at once: ... Depending on the CLI shell you are working with, some of the color highlighting and formatting may look different for you. Despite the fact that Git is a CLI tool, it has some nice visual options already built in.
๐ŸŒ
Hatica
hatica.io โ€บ blog โ€บ git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
April 24, 2023 - For example, to view the log since March 1st, 2023, you would use the command "git log --since=2023-03-01." Another useful option is the "--author" option. This option allows you to filter the log output by author.
๐ŸŒ
TOOLSQA
toolsqa.com โ€บ git โ€บ git-log
How to view Commit History in Git using Git Log Command?
Combine oneline option with since..until to have a compressed view of the same. Commits can also be viewed by assigning a specific number. For example, we can view the last 4 commits that happened in our repository. It is a very simple git command which needs no explanation. ... As you can see, you have got the last three commits with one-line descriptions. Git log is a very important command in this course and your Git learning journey.
๐ŸŒ
Initial Commit
initialcommit.com โ€บ blog โ€บ git-log
git log | A Guide to Using the log Command in Git - Initial Commit
May 29, 2022 - However, if youโ€™d like an exhaustive list of options, you can head over to the git --pretty docs. It can be helpful to visualize your Git commit history. This can be accomplished using the git log --graph command.
๐ŸŒ
Coderwall
coderwall.com โ€บ p โ€บ euwpig โ€บ a-better-git-log
A better git log (Example)
December 10, 2025 - I also want to add, you can write the git log output stream to a file and see an HTML report about your repository. There are many open-source solutions for this.
๐ŸŒ
Medium
medium.com โ€บ @mohanapriya11897 โ€บ commonly-used-git-log-commands-ece338ec704
Commonly used Git Log Commands
August 13, 2021 - Essential GitLog commands with examples. Purpose of version control Version Control is important to keep track of the changes and make sure that every team member is working on the latest version โ€ฆ
๐ŸŒ
Career Karma
careerkarma.com โ€บ blog โ€บ git โ€บ git log: how to use it
Git Log: How to Use It: A Step-By-Step Guide | Career Karma
December 1, 2023 - By default, the git log command displays a commit hash, the commit message, and other commit metadata. You can filter the output of git log using various options.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ git โ€บ how-to-check-git-logs
Git Logs - GeeksforGeeks
1 month ago - ... Displays commits grouped by author when only a single contributor exists. In multi-developer repositories, lists all contributors with commit counts and messages. Supports multiple options (-s, -n, -e) for customized and structured output.
Top answer
1 of 16
1220
git log --pretty=format:"%h%x09%an%x09%ad%x09%s"

does the job. This outputs:

  fbc3503 mads    Thu Dec 4 07:43:27 2008 +0000   show mobile if phone is null...
  ec36490 jesper  Wed Nov 26 05:41:37 2008 +0000  Cleanup after [942]: Using timezon
  ae62afd tobias  Tue Nov 25 21:42:55 2008 +0000  Fixed #67 by adding time zone supp
  164be7e mads    Tue Nov 25 19:56:43 2008 +0000  fixed tests, and a 'unending appoi
  93f1526 jesper  Tue Nov 25 09:45:56 2008 +0000  adding time.ZONE.now as time zone
  2f0f8c1 tobias  Tue Nov 25 03:07:02 2008 +0000  Timezone configured in environment
  a33c1dc jesper  Tue Nov 25 01:26:18 2008 +0000  updated to most recent will_pagina

It was inspired by Stack Overflow question: "Git log output like 'svn ls -v'". I found out that I could add the exact parameters I needed.

To shorten the date (not showing the time), use --date=short.

In case you were curious what the different options were:

  • %h = abbreviated commit hash
  • %x09 = tab (character for code 9)
  • %an = author name
  • %ad = author date (format respects --date= option)
  • %s = subject

It is from git-log(1) Manual Page (PRETTY FORMATS section) by the comment of Vivek.

2 of 16
294

I use these two .gitconfig file settings:

[log]
  date = relative
[format]
  pretty = format:%h %Cblue%ad%Creset %ae %Cgreen%s%Creset

%ad is the author date, which can be overridden by --date or the option specified in the [log] stanza in .gitconfig. I like the relative date, because it gives an immediate feeling of when stuff was committed. The output looks like this:

6c3e1a2 2 hours ago [email protected] lsof is a dependency now.
0754f18 11 hours ago [email protected] Properly unmount, so detaching works.
336a3ac 13 hours ago [email protected] Show ami registration command if auto register fails
be2ad45 17 hours ago [email protected] Fixes #6. Sao Paolo region is included as well.
5aed68e 17 hours ago [email protected] Shorten while loops

This is all of course in color, so it is easy to distinguish the various parts of a log line. Also it is the default when typing git log because of the [format] section.

Since Git now supports padding, I have a nice amendment to the version above:

pretty = format:%C(yellow)%h %Cblue%>(12)%ad %Cgreen%<(7)%aN%Cred%d %Creset%s

This right aligns the relative dates and left aligns committer names, meaning you get a column-like look that is easy on the eyes.

Screenshot

Since GPG commit signing is becoming a thing, here is a version that includes signature verification (in the screenshot it's the magenta letter right after the commit). A short explanation of the flag:

%G?: show "G" for a good (valid) signature, "B" for a bad signature, "U" for a good signature with unknown validity and "N" for no signature

Other changes include:

  • colors are now removed if the output is to something other than the tty (which is useful for grepping, etc.)
  • git log -g now contains the reflog selector.
  • Save two parentheses on refnames and put them at the end (to preserve column alignment)
  • Truncate relative dates if they are too long (e.g., 3 years, 4..)
  • Truncate committer names (it might be a little short for some people, but just change the %<(7,trunc) or check out the Git .mailmap feature to shorten committer names)

Here's the configuration:

pretty = format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(7,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D

All in all column alignment is now preserved a lot better at the expense of some (hopefully) useless characters.

I'd love to make the message color depend on whether a commit is signed, but it doesn't seem like that is possible at the moment.

Screenshot

๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ git-log-command
Git Log Command Explained
January 11, 2020 - One of the benefit of using this command is that it enables you to get a overview of how commits have merged and how the git history was created. There are may other options you could use in combination with --graph. Couple of them are --decorate and --all. Make sure to try these out too.
๐ŸŒ
The Geek Stuff
thegeekstuff.com โ€บ 2014 โ€บ 04 โ€บ git-log
10 Essential Git Log Command Examples on Linux to View Commits
April 4, 2014 - This can be accomplished using the -<n> option. Replace <n> with the number of commits you would like to see. i.e. To see the 3 most recent commits: $ git log -3 commit c36d2103222cfd9ad62f755fee16b3f256f1cb21 Author: Bob Smith <BSmith@example.com> Date: Tue Mar 25 22:09:26 2014 -0300 Ut sit.
๐ŸŒ
MIT
web.mit.edu โ€บ git โ€บ www โ€บ git-log.html
git-log(1)
November 17, 2025 - Show the notes (see git-notes(1)) that annotate the commit, when showing the commit log message. This is the default for git log, git show and git whatchanged commands when there is no --pretty, --format, or --oneline option given on the command line.