git log -10

Would show 10 latest commits matching the revision spec (a missing spec means "all commits").

See manpage:

git help log

section Commit Limiting

-<number>, -n <number>, --max-count=<number>
    Limit the number of commits to output.
Answer from kostix on Stack Overflow
🌐
Git
git-scm.com › docs › git-log
Git - git-log Documentation
Various other options and paths parameters can be used to further limit the result. ... A special notation "<commit1>..<commit2>" can be used as a short-hand for "^<commit1> <commit2>". For example, either of the following may be used interchangeably: ... Another special notation is "<commit1>...<commit2>" which is useful for merges. The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent: $ git log A B --not $(git merge-base --all A B) $ git log A...B
🌐
Poddarayush
poddarayush.com › posts › limit-git-log-output
Less is more - Limit the size of your Git log output | Poddar, Ayush
By default, git log returns all the commits. Generally, we require only a set of them. Learn how to limit the size of your Git log output.
Discussions

logging - How to log first 10 commits in Git - Stack Overflow
Or, use git rev-list HEAD | tail -n 10 to get the 10 IDs to list, which you can then show in whatever format you like (not limited to the one-line method). 2012-04-27T07:09:04.223Z+00:00 ... tail seems to lose the nice coloring that I get in my git console. Passing a parameter like git log ... More on stackoverflow.com
🌐 stackoverflow.com
Gitlab CI : git log limited to 10 commits
Gitlab CI : git log limited to 10 commits I’m trying to create release notes in a Gitlab CI job, but the git log command seems to be limited to ten commits. So when I push ore merge more than ten commits, I have this error : fatal: Invalid revision range. My command is git log ${CI_COMMI... More on forum.gitlab.com
🌐 forum.gitlab.com
1
0
January 6, 2021
How can I get git log to limit the number of lines per commit message? - Stack Overflow
I'm using git log to read through commit messages, but some of them are super-long, containing backtraces and other things that I don't want to see. I'd like to see maybe the first 10 lines of the ... More on stackoverflow.com
🌐 stackoverflow.com
How do I limit the number of commits shows in git log per page but continue the pagination upon pressing spacebar? - Stack Overflow
I want to limit the commits shown in one go, right now it's maximum the screen can show. If I use git diff --oneline -20 it stops after 20, i want to continue after 20. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Medium
medium.com › @qjli › daily-dev-tips-82-how-to-limit-the-commits-list-output-via-git-log-properly-c2bd89a364cd
Daily Dev Tips №82 — how to limit the commits list output via git log properly | by QJ Li | Medium
August 23, 2018 - Daily Dev Tips №82 — how to limit the commits list output via git log properly I am going to show you some tips that you can use to control the output from git log, very handy if you are using …
🌐
Atlassian
atlassian.com › git › tutorials › git-log
Advanced Git Log | Atlassian Git Tutorial
January 12, 2026 - You can limit git log’s output by including the -<n> option.
🌐
Git
git-scm.com › book › en › v2 › Git-Basics-Viewing-the-Commit-History
2.3 Git Basics - Viewing the Commit History
In addition to output-formatting options, git log takes a number of useful limiting options; that is, options that let you show only a subset of commits. You’ve seen one such option already — the -2 option, which displays only the last two commits. In fact, you can do -<n>, where n is any ...
🌐
Linux Kernel
kernel.org › pub › software › scm › git › docs › git-log.html
git-log(1) Manual Page
August 25, 2025 - Various other options and paths parameters can be used to further limit the result. ... A special notation "<commit1>..<commit2>" can be used as a short-hand for "^<commit1> <commit2>". For example, either of the following may be used interchangeably: ... Another special notation is "<commit1>...<commit2>" which is useful for merges. The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent: $ git log A B --not $(git merge-base --all A B) $ git log A...B
🌐
MIT
web.mit.edu › git › www › git-log.html
git-log(1)
November 17, 2025 - Various other options and paths parameters can be used to further limit the result. ... A special notation "<commit1>..<commit2>" can be used as a short-hand for "^<commit1> <commit2>". For example, either of the following may be used interchangeably: ... Another special notation is "<commit1>...<commit2>" which is useful for merges. The resulting set of commits is the symmetric difference between the two operands. The following two commands are equivalent: $ git log A B --not $(git merge-base --all A B) $ git log A...B
Find elsewhere
🌐
Initial Commit
initialcommit.com › blog › git-log
git log | A Guide to Using the log Command in Git
May 29, 2022 - This command is rather verbose, so let’s combine it with our previously mentioned filter that limits our log to that last two commits: $ git log --stat -2 commit a7d29889d47dfc5e6c8f91974039f91231269d95 (HEAD -> master) Author: Initial Commit LLC <Example@domain.com> Date: Tue May 24 13:40:55 ...
🌐
Gitcheatsheet
gitcheatsheet.org › how-to › git-log-limit
Show the latest N commits | Git Cheat Sheet
git log -3 · Show the log containing commit history · Show the log, one line for each commit · Show the commits that affect a specific file or directory · Show a patch with changes introduced by each commit · Show the log as a graph · Filter the log entries by author name ·
🌐
Medium
medium.com › the-andela-way › exploring-the-git-log-command-9117b9ff3c2c
Exploring the Git log command. An In-depth look at the power of… | by John Kagga | The Andela Way | Medium
May 10, 2019 - 17aa4d468 (HEAD -> master, tag: ... DevTools logs and warnings (#11448) 221aa954f Refer people to "good first issue" 61d35ce1f Record sizes and fix bundle lint fd47129ce Remove support for passing badly typed elements to shallow renderer (#11442) c2b68dae6 Fix typo 6ad203630 Add a link to RCR explanation 73bb99626 Update changelog · We can limit the git log output ...
🌐
Unstop
unstop.com › home › blog › git log | a comprehensive guide including all options
Git Log | A Comprehensive Guide Including All Options
October 5, 2023 - As mentioned above, there are many ... the git log command and present a more detailed explanation in reference to the commit history. Some of these are as follows: --oneline: This option produces an overview of the respective Git project, and it presents a meaningful history in default mode. It displays each commit on a single line. -n: This option limits the number ...
🌐
Hatica
hatica.io › blog › git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
April 24, 2023 - Git provides several options to limit the output of the log command. One of the most useful options is the "--since" option. This option allows you to specify a date and time to start the log output.
🌐
Ubuntu Manpages
manpages.ubuntu.com › manpages › trusty › › man1 › git-log.1.html
Ubuntu Manpage: git-log - Show commit logs
See git-shortlog(1). --full-diff Without this flag, git log -p <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 ...
🌐
Linux Man Pages
linux.die.net › man › 1 › git-log
git-log(1): commit logs - Linux man page
Limit the commits output to ones with log message that matches the specified pattern (regular expression).
🌐
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 - Git by default pipes all output through a pager so you see only one page of log output at a time. You can limit the log output by using the -<n> option which limits the output to the last ’n’ commits:
🌐
Linux Man Pages
man7.org › linux › man-pages › man1 › git-log.1.html
git-log(1) - Linux manual page
The remaining commits are what comes out in the command’s output. Various other options and paths parameters can be used to further limit the result. Thus, the following command: $ git log foo bar ^baz means "list all the commits which are reachable from foo or bar, but not from baz".