How to show a git message body (not just the title)?

202 Views Asked by At

I've been doing a fair amount of research and can't find this trivial functionality:

git log and git show are only showing the headline/title of the commit message, but I'd like to see the rest of the body.

By body, I mean the section where 'conflicts' and 'squashed commits' are usually listed.

How can I view this information?

Thanks

2

There are 2 best solutions below

0
jthill On BEST ANSWER

When you create a commit, the Git-supplied template includes comments that, with default options, won't be included in the resulting commit message.

To include them, you can either strip the comment leader (a leading # character cause git to ordinarily strip that line from the resulting message) or supply an alternate message-cleanup option.

:%s,^#,,

is the vim command to strip the comment leaders.

0
Damika On

After you squashed, actually you can't see the deleted commits. But I think it'll be a useful "git reflog" command. It shows the path of your head had been with hash codes.my experience in above command