How to show git commit using number of commits since a tag

后端 未结 8 1157
执笔经年
执笔经年 2021-02-05 07:39

With git describe you can get the number of commits since the last tag. If you only had the tag and the number of commits what is the best way to show the commit t

8条回答
  •  梦毁少年i
    2021-02-05 07:58

    If you are looking for the number of commits since the last tag, the following worked for me

    git rev-list  `git rev-list --tags --no-walk --max-count=1`..HEAD --count
    

提交回复
热议问题