I first did repo sync to a manifest for a branch name myBranch. I then get the tags from
git tag -l
Now I want to know using git that each tag obtained as a result of git tag -l was actually created on which branch. Please note : I do not want myBranch as the output but the remote branch name on which the tag was created.
Keeping aside the fact that branches can be renamed or deleted at any time (without losing any commits, which can still be referenced in the path of another branch), the best you can do is:
See "Show the original branch for a commit", combined with "Git - how to tell which commit a tag points to".
(Ie, a combination of git rev-parse <tag>~0
with git branch --contains <sha1>
)
This has nothing to do with the branch on which the tag was created, but rather the branch(es) which currently reference said tag.
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