Search code examples
gitgit-tag

How can I show just the message for an annotated tag?


There seem to be ways in git to show the message of an annotated tag as well as the commit detail and other stuff git show the_tag, or the name and the detail git tag -l -n100 the_tag.

But what command shows the message/body and absolutely nothing else?


Solution

  • When the convenience commands are doing too much, go for the core :-)

    git for-each-ref refs/tags/$tagname --format='%(contents)'
    

    for-each-ref docs