Is there any possibility to search tag by name?
In the project there is many tags and some of them have the same (specific) word in their names. Using git tag
is presenting all available tags, but I want to get tag list of these with a specific word in name.
In order to find the latest Git tag available on your repository, you have to use the “git describe” command with the “–tags” option. This way, you will be presented with the tag that is associated with the latest commit of your current checked out branch.
To switch to a commit-like object, including single commits and tags, use git switch --detach <commitish> , where <commitish> is the tag name or commit number.
Tags are ref's that point to specific points in Git history. Tagging is generally used to capture a point in history that is used for a marked version release (i.e. v1. 0.1). A tag is like a branch that doesn't change. Unlike branches, tags, after being created, have no further history of commits.
git tag -l
accepts an optional parameter, which is a (fnmatch
-like) pattern. So you can use (for example) git tag -l '*word*'
if you want to list tags with “word” in their name.
I think you need to use egrep with appropriate regex for you. At first glance this one is good:
git tag | egrep *word*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With