How to output git log with the first line only?

前端 未结 9 1835
猫巷女王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 18:08

    You can define a global alias so you can invoke a short log in a more comfortable way:

    git config --global alias.slog "log --pretty=oneline --abbrev-commit"

    Then you can call it using git slog (it even works with autocompletion if you have it enabled).

提交回复
热议问题