How to make 'git log --online' show which messages are multi-line messages

I often do git log --onelineto quickly look at the changes that I'm going to push or merge from the remote. Is it possible to add some identifier (for example, "[...]") to mark this commit message as multi-line so that I can know that there is more information there?

Basically, I want this:

e1140de Some commit message
d1f58d1 Some multine commit message [...]
736f778 Some other commit message
+5
source share
3 answers

Using Adam's answer , I came up with an alternative to my requirement:

git log --format="%h %s%n%b"

This is similar --oneline, except that it places the line and body of the message immediately after the subject of the message. It looks much better with some coloring:

git log --format="%C(yellow)%h%Creset %Cgreen%s%Creset%n%b"
+6

. git log (%b) .

: , .

+2

I'm used to manually adding "(sb)" for this, which means "see below."

You can use hook-commit-msg to add it automatically if commit commit is multi-line.

+1
source

All Articles