How to get the branch from tag name in Git?

前端 未结 3 1879
栀梦
栀梦 2021-01-19 16:51

I am trying to get the branch name from a given tag. I tried git describe --tag but this doesn\'t provide me any branch name. I tried using

3条回答
  •  轮回少年
    2021-01-19 17:28

    A tag is just an alias name for a commit.

    That said, this should answer your question: https://stackoverflow.com/a/2707110/550177

提交回复
热议问题