How to get the branch from tag name in Git?
问题 I am trying to get the branch name from a given tag. I tried git describe --tag <tag-name> but this doesn't provide me any branch name. I tried using gitk to show to the tags and branch but gitk doesn't show me the tag. When I list out the tags git tag -l I see the tag name exist in the list. I just want a simple command which can tell me the branch when tag name is provided. 回答1: Tags and Branches in Git are only Labels pointing to specific snapshot of your files. That being said, Tags ain't