How to list all tags pointing to a specific commit in git

后端 未结 6 779
独厮守ぢ
独厮守ぢ 2020-12-02 15:26

I have seen the commands git describe and git-name-rev but I have not managed to get them to list more than one tag.

Example: I have the sh

6条回答
  •  佛祖请我去吃肉
    2020-12-02 15:54

    git show-ref --tags -d | grep ^48eb354 | sed -e 's,.* refs/tags/,,' -e 's/\^{}//'

    should work for both lightweight and annotated tags.

提交回复
热议问题