Think before you speak, read before you think.

git 一个commit 有多个 tag

by

in

一个 commit 不小心打了多个 tag

输出最新的 tag

LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))

根据最新的 commit 显示多个 tag

git show-ref --tags | grep $(git rev-parse v0.2.0)
a359509551c1a85cdfbf7675d3f7f36a8577ee38 refs/tags/v0.2.0
a359509551c1a85cdfbf7675d3f7f36a8577ee38 refs/tags/v0.3.0

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *