I want git to list all tags along with the full annotation or commit message. Something like this is close:
git tag -n5
This does exactly w
Try this it will list all the tags along with annotations & 9 lines of message for every tag:
git tag -n9
can also use
git tag -l -n9
if specific tags are to list:
git tag -l -n9 v3.*
(e.g, above command will only display tags starting with "v3.")
-l , --list List tags with names that match the given pattern (or all if no pattern is given). Running "git tag" without arguments also lists all tags. The pattern is a shell wildcard (i.e., matched using fnmatch(3)). Multiple patterns may be given; if any of them matches, the tag is shown.
Mark Longair's answer (using git show
) is close to what is desired in the question. However, it also includes the commit pointed at by the tag, along with the full patch for that commit. Since the commit can be somewhat unrelated to the tag (it's only one commit that the tag is attempting to capture), this may be undesirable. I believe the following is a bit nicer:
for t in `git tag -l`; do git cat-file -p `git rev-parse $t`; done