How can I quickly get all the commit messages of a repository?

How can I quickly get all the commit messages of a repository?

The general answer is the git log command. Without any further options it will list all commits on the current branch, from newest to oldest, each with author, date, and commit message.

You can give a branch name to show commits on that branch instead of the current one (e.g. git log my-branch), and there are a lot of options to change what is displayed for each commit, e.g. you can use --format=oneline to see very condensed information with only the first line of the commit message. You can find a lot more options in the git log documentation.

1 Like