Count the number of commits on a Git branch

后端 未结 12 1058
[愿得一人]
[愿得一人] 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:03

    How about git log --pretty=oneline | wc -l

    That should count all the commits from the perspective of your current branch.

提交回复
热议问题