git log to return only the commits made to the master branch?

I think this is what you want

git log --first-parent master

To quote the manual

Follow only the first parent commit upon seeing a merge commit. This
option can give a better overview when viewing the evolution of a
particular topic branch, because merges into a topic branch tend to be
only about adjusting to updated upstream from time to time, and this
option allows you to ignore the individual commits brought in to your
history by such a merge.

Leave a Comment