Have you tried this?

git log --oneline 

It's an alias for git log --pretty=oneline --abbrev-commit, and displays the "short sha" and "short description", for example:

9bee8857 Write more code
831fdd6e Write some code Second line of message

The problem is that you are missing an empty line after the first line of your commit message. The command above usually works for me, but I just tested on a commit without empty second line. I got the same result as you: the whole message on one line.

Empty second line is a standard in git commit messages. The behaviour you see was probably implemented on purpose.

The first line of a commit message is meant to be a short description. If you cannot make it in a single line you can use several, but git considers everything before the first empty line to be the "short description". oneline prints the whole short description, so all your 3 rows.

Answer from Gauthier on Stack Overflow
🌐
Git
git-scm.com › docs › git-shortlog
Git - git-shortlog Documentation
Additionally, "[PATCH]" will be ... is not a terminal or there is no current branch, git shortlog will output a summary of the log read from standard input, without reference to the current repository....
🌐
Git
git-scm.com › docs › git-log
Git - git-log Documentation
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
🌐
30 Seconds of Code
30secondsofcode.org › home › git › repository › short commits summary
View a short summary of Git commits - 30 seconds of code
May 23, 2023 - One of these is --oneline, which is actually a shorthand for --pretty=oneline --abbrev-commit. It prints a short summary of all commits, with each commit being printed on a single line. git log --oneline # d540ba1 Merge network bug fix # 3050fc0 Fix network bug # c191f90 Initial commit
🌐
Atlassian
atlassian.com › git › tutorials › git-log
Advanced Git Log | Atlassian Git Tutorial
January 12, 2026 - The git shortlog command is a special version of git log intended for creating release announcements. It groups each commit by author and displays the first line of each commit message.
🌐
Linux Kernel
kernel.org › pub › software › scm › git › docs › git-shortlog.html
git-shortlog(1)
February 11, 2026 - Additionally, "[PATCH]" will be ... is not a terminal or there is no current branch, git shortlog will output a summary of the log read from standard input, without reference to the current repository....
🌐
ttias.be
ma.ttias.be › pretty-git-log-in-one-line
Pretty git log in one line
August 25, 2015 - $ git log --pretty=oneline 3396763626316124388f76be662bd941df591118 Add twitter link c73bbc98b5f55e5a4dbfee8e0297e4e1652a0687 add facebook link
Find elsewhere
🌐
Git
git-scm.com › docs › pretty-formats
Git - pretty-formats Documentation
$ git log -2 --pretty=format:%h 4da45bef \ | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' 4da45be 7134973 -- NO NEWLINE $ git log -2 --pretty=tformat:%h 4da45bef \ | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' 4da45be 7134973
🌐
Medium
medium.com › @ShanbhagMahesh › git-short-log-57641f8de9bf
GIT Short Log. Git log is the most commonly used… | by Mahesh Shanbhag | Medium
January 9, 2015 - To make it even more useful I have aliased this to a very short command git slog, which can be configured with the following git config line · git config —global alias.slog ‘log —pretty=format:”%Cred%H %C(cyan) � %Cgreen %s %C(yellow)%C(bold)(%cN) %Creset” —date=short’
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

🌐
FutureLearn
futurelearn.com › home › blog
Git short log
October 25, 2022 - In this video, Bogdan Stashchuk, from stashchuk.com, explores what the Git shortlog command is and how it is used.
🌐
Graphite
graphite.com › guides › using-git-log-1
How to use the git log -1 command
The syntax git log -1 uses a shorthand option to modify the output of the git log command. This option limits the number of commit entries returned by the command. Specifically, -1 tells Git to show only the most recent commit.
🌐
Conventional Commits
conventionalcommits.org › en › v1.0.0
Conventional Commits
A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., fix: array parsing issue when multiple spaces were contained in string.
🌐
GitHub
gist.github.com › joshbuchea › 6f47e86d2510bce28f8e7f42ae84c716
Semantic Commit Messages · GitHub
Save joshbuchea/6f47e86d2510bce28f8e7f42ae84c716 to your computer and use it in GitHub Desktop. ... See how a minor change to your commit message style can make you a better programmer. ... feat: add hat wobble ^--^ ^------------^ | | | +-> Summary in present tense. | +-------> Type: chore, docs, feat, fix, refactor, style, or test. ... I would go with test. ... How about "benchg" - Combines "bench" and "chg" (shorthand for "change"), or "benchmod" - "bench" and "mod" (modification).
🌐
Medium
medium.com › edureka › git-log-format-history-189c02f3bcca
Git Log Format History | Edureka
April 26, 2021 - Command: git log --abbrev-commit The full 40-byte hexadecimal commit object name is shortened to default 7-bytes.
🌐
Git
git-scm.com › docs › git-show
Git - git-show Documentation
Pretty-print the contents of the commit logs in a given format, where <format> can be one of oneline, short, medium, full, fuller, reference, email, raw, format:<string> and tformat:<string>. When <format> is none of the above, and has %<placeholder> in it, it acts as if --pretty=tformat:<format> ...
🌐
Git
git-scm.com › book › en › v2 › Git-Basics-Viewing-the-Commit-History
Git - Viewing the Commit History
This option changes the log output to formats other than the default. A few prebuilt option values are available for you to use. The oneline value for this option prints each commit on a single line, which is useful if you’re looking at a lot of commits. In addition, the short, full, and ...
🌐
W3Schools
w3schools.com › git › git_commit.asp
Git Commit
git log commit 09f4acd3f8836b7... Fri Mar 26 09:13:07 2021 +0100 First release of Hello World! For a shorter view, use git log --oneline: git log --oneline 09f4acd Updated index.html with a new line 221ec6e First release of ...
🌐
Scaler
scaler.com › home › topics › git › git log --oneline
Git log --oneline - Scaler Topics
May 4, 2023 - When the � string is added as ... points in the git log graph output. When the %h string is added as a parameter along with the pretty option, then a short commit hash will be displayed....
🌐
GitHowTo
githowto.com › history
9. History
git log --pretty=format:"%h � | %s%d [%an]" --date=short