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

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

Read the full book at www.amazon.com
Posted in GIT, GIT Interview Questions

Leave a Reply

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

*