Is it possible with Git to retrieve a list of tags that exist only in a certain branch?

前端 未结 2 1285
迷失自我
迷失自我 2020-12-18 01:08

I would like to know if it\'s possible in Git to retrieve a list of tags (much like the result of the git tag command), but the list should be limited only to a

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-18 02:05

    Another approach would be possible with the new git tag options --merged (in git 2.7+, Q4 2015)

    git tag --merged 
    

    See commit 5242860, ... (10 Sept 2015) by Karthik Nayak (KarthikNayak).
    (Merged by Junio C Hamano -- gitster -- in commit 8a54523, 05 Oct 2015)

    tag.c: implement '--merged' and '--no-merged' options

    Use 'ref-filter' APIs to implement the '--merged' and '--no-merged' options into 'tag.c'.

    • The '--merged' option lets the user to only list tags merged into the named commit.
    • The '--no-merged' option lets the user to only list tags not merged into the named commit.

    If no object is provided it assumes HEAD as the object.

提交回复
热议问题