Count the number of commits on a Git branch

后端 未结 12 1110
[愿得一人]
[愿得一人] 2020-12-02 04:28

I found this answer already: Number of commits on branch in git but that assumes that the branch was created from master.

How can I count the number of commits along

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 05:00

    One way to do it is list the log for your branch and count the lines.

    git log  --oneline | wc -l
    

提交回复
热议问题