我怎样才能获得特定git分支的标签列表?

问题描述 投票:0回答:1

我想要一个特定分支的标签列表。以下是我所拥有的分支机构。

$ git branch

    master
  • master_release new_branch new_branch_1 new_branch_2

git tag命令给出所有分支的标签列表。

我需要的格式是master_release分支的标签列表

Tdja

TAG2

TAG1

其中tag3是最新的分支

git
1个回答
0
投票

我认为这将是git tag --list --merged

Docs say

--merged [<commit>]

仅列出其提交可从指定提交到达的标记(如果未指定,则为HEAD),与--no-merged不兼容。


How to list all tags within a certain git branch解释的还有一种更为复杂的方式

© www.soinside.com 2019 - 2024. All rights reserved.