If there are tags in the remote repository, I\'m usually getting them automatically when pulling. When I delete the created local tag (git tag -d
)
a tag isn't "local" or "remote": it is associated to a commit, which can part of multiple branches, including ones in the remotes namespace.
Get tag SHA1 of the commit referenced by a tag
git show -s 'TAG_NAME^{commit}' --format='%H'
, and do a :
git branch -a --contains SHA1
If you see
remotes/aRemoteRepoName/aBranch
you know that tag references a commit you have fetched from a remote repo.
As Chris mentions:
git branch -a --contains TAGNAME
will dereference the tag and gives the answer in one go.