How to output git log with the first line only?

前端 未结 9 1858
猫巷女王i
猫巷女王i 2021-01-29 17:29

I am trying to customize the format for git log. I want all commits to be shown in one line. Each line should only show the first line of the commit message.
I

9条回答
  •  一个人的身影
    2021-01-29 17:55

    if you only want the first line of the messages (the subject):

    git log --pretty=format:"%s"
    

    and if you want all the messages on this branch going back to master:

    git log --pretty=format:"%s" master..HEAD
    

    Last but not least, if you want to add little bullets for quick markdown release notes:

    git log --pretty=format:"- %s" master..HEAD
    

提交回复
热议问题