gitgit-loggit-format

How to get `git log` to display only commit messages?


Is there a way for git log to output only the commit messages, nothing else?

I'd like to do this as a starting point for composing release notes.


Solution

  • git log --format=%s
    

    git log has an option called format which you can use to specify the format for how each entry is logged. The option can take various "placeholders" to extract specific bits of information. %s is the placeholder for the commit subject. See documentation for more information.