How can we convert git log messages to a different format?

We can use pretty option in git log command for this.

git log – pretty

This option converts the output format from default to other formats. There are pre-built formats available for our use.

git log –pretty=oneline

git log –pretty=format:”%h – %an, %ar : %s”
ba72a6c – Dave Adams, 3 years ago : changed the version number

Leave a Reply

Your email address will not be published. Required fields are marked *