🌐
Git
git-scm.com › docs › git-log
Git - git-log Documentation
$ git log A B --not $(git merge-base --all A B) $ git log A...B · The command takes options applicable to the git-rev-list[1] command to control what is shown and how, and options applicable to the git-diff[1] command to control how the changes each commit introduces are shown.
🌐
Git
git-scm.com › book › en › v2 › Git-Basics-Viewing-the-Commit-History
2.3 Git Basics - Viewing the Commit History
As you can see, the --stat option prints below each commit entry a list of modified files, how many files were changed, and how many lines in those files were added and removed. It also puts a summary of the information at the end. Another really useful option is --pretty. This option changes the log output to formats other than the default.
Discussions

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
How to see branch tree from command line?

I use git log --all --graph --decorate --oneline

More on reddit.com
🌐 r/git
13
8
June 13, 2014
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 ...
🌐
Linux Kernel
kernel.org › pub › software › scm › git › docs › git-log.html
git-log(1) Manual Page
August 25, 2025 - $ git log A B --not $(git merge-base --all A B) $ git log A...B · The command takes options applicable to the git-rev-list(1) command to control what is shown and how, and options applicable to the git-diff(1) command to control how the changes each commit introduces are shown.
🌐
Git
git.github.io › git-reference › inspect
Git Reference
If the -p option is too verbose for you, you can summarize the changes with --stat instead. Here is the same log output with --stat instead of -p · $ git log --stat --no-merges -2 commit 594f90bdee4faf063ad07a4a6f503fdead3ef606 Author: Scott Chacon <schacon@gmail.com> Date: Fri Jun 4 15:46:55 2010 +0200 reverted to old class name ruby.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 3cbb6aae5c0cbd711c098e113ae436801371c95e Author: Scott Chacon <schacon@gmail.com> Date: Fri Jun 4 12:58:53 2010 +0200 fixed readme title differently README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
🌐
Initial Commit
initialcommit.com › blog › git-log
git log | A Guide to Using the log Command in Git - Initial Commit
May 29, 2022 - Options for git log --pretty are pretty extensive, so for the sake of brevity, this example will suffice. However, if you’d like an exhaustive list of options, you can head over to the git --pretty docs.
🌐
Hatica
hatica.io › blog › git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
April 24, 2023 - Git logs can also display statistics about the changes made in each commit using the "--stat" option. This option displays the number of files changed, the number of lines added and removed, and the file names.
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.
🌐
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 Man Pages
man7.org › linux › man-pages › man1 › git-log.1.html
git-log(1) - Linux manual page
option) � author date, RFC2822 style %ar author date, relative %at author date, UNIX timestamp %ai author date, ISO 8601-like format %aI author date, strict ISO 8601 format %as author date, short format (YYYY-MM-DD) %ah author date, human style (like the --date=human option of git-rev-list(1)) %cn committer name %cN committer name (respecting .mailmap, see git-shortlog(1) or git-blame(1)) � committer email � committer email (respecting .mailmap, see git-shortlog(1) or git-blame(1)) %cl committer email local-part (the part before the @ sign) %cL committer local-part (see %cl) respecting .
🌐
Medium
medium.com › @phanindramoganti › a-quick-rundown-of-some-useful-git-log-options-bd616d1b489a
A quick rundown of some useful Git log options. | by Phanindra Moganti | Medium
July 2, 2018 - The log output can be compacted even more. Usually one would never need more than a few characters (7–10) from the SHA checksum to uniquely identify a commit. So displaying the whole 40 character hash is usually not required. The — abbrev-commit option will output shorter values but will still keep the commits unique: $git log --pretty=oneline -2 ca82a6d added blah feature 085bb3b did something unnecessary
🌐
Devhints
devhints.io › git › git log cheatsheet
git log cheatsheet
git log master # branch git log origin/master # branch, remote git log v1.0.0 # tag git log master develop git log v2.0..master # reachable from *master* but not *v2.0* git log v2.0...master # reachable from *master* and *v2.0*, but not both
🌐
Unstop
unstop.com › home › blog › git log | a comprehensive guide including all options
Git Log | A Comprehensive Guide Including All Options
October 5, 2023 - This command will display the abbreviated commit hash (%h) and subject (%s) of each commit, followed by the abbreviated parent hash of each parent list directory. It can be challenging to recognize that two successive or consecutive commits do not belong to a linear branch when the --graph is not used because all default history line branches are flattened. In such a situation, the --show-linear-break[=<barrier>] option places a barrier between them. So, if <barrier> is provided, that string will be displayed as opposed to the default one. The --date=iso option in Git log is used to format the commit date in a manner similar to ISO 8601-like format.
🌐
MIT
web.mit.edu › git › www › git-log.html
git-log(1)
November 17, 2025 - $ git log A B --not $(git merge-base --all A B) $ git log A...B · The command takes options applicable to the git-rev-list(1) command to control what is shown and how, and options applicable to the git-diff(1) command to control how the changes each commit introduces are shown.
🌐
Git
git-scm.com › docs › git-shortlog
Git - git-shortlog Documentation
For example, --cherry-pick --right-only A...B omits those commits from B which are in A or are patch-equivalent to a commit in A. In other words, this lists the + commits from git cherry A B. More precisely, --cherry-pick --right-only --no-merges gives the exact list. ... A synonym for --right-only --cherry-mark --no-merges; useful to limit the output to the commits on our side and mark those that have been applied to the other side of a forked history with git log --cherry upstream...mybranch, similar to git cherry upstream mybranch. ... Instead of walking the commit ancestry chain, walk reflog entries from the most recent one to older ones. When this option is used you cannot specify commits to exclude (that is, ^<commit>, <commit1>..<commit2>, and <commit1>...<commit2> notations cannot be used).
🌐
Scaler
scaler.com › home › topics › git › git log --oneline
Git log --oneline - Scaler Topics
May 4, 2023 - Now, you might have got a clear understanding of the git log command. However, the visuals of the commits history which is displayed as output is not much pleasing, and due to that, the result is bulky and it is difficult for the user to read the commit history. To fix that, we can use the --oneline option along with the git log command.
🌐
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.
🌐
Coderwall
coderwall.com › p › euwpig › a-better-git-log
A better git log (Example)
December 10, 2025 - Call me old fashioned. I use the alias glo mapped to git log --decorate --oneline --graph and that works well for me.
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-check-git-logs
Git Logs - GeeksforGeeks
March 20, 2026 - git log --author="Alex" --grep="login" --after="2025-09-01" Narrows down search efficiently. Displays commits grouped by author. ... 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.
🌐
CodingNomads
codingnomads.com › git-log
Git Log
As you can see, Git provides some great options that can help you to visualize your project's history, and get a better understanding of how commits and branches are related to each other. The git log --stat command shows which files were modified in each commit.