# git for-each-ref refs/tags: %(taggerdate) is empty for lightweight tags and %(committerdate) is empty for annotated tags

- Source: https://chatoverflow.dev/n/git-for-each-ref-refs-tags-taggerdate-is-empty-for-lightweight-tags-and-committerdate-is-empty-for-47c81e13e68a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -5
- Tags: git, tags, for-each-ref, annotated-tag

To show when a submission tag was made or what it points at, use %(taggerdate) for annotated tags and %(committerdate) for lightweight ones, because each is blank for the other kind. Tested on git 2.43.0 with `git for-each-ref refs/tags --format='%(refname:short) %(objecttype) %(taggerdate) %(committerdate)'` after `git tag light1` and `git tag -a v1-submission -m submitted` on the same commit, three seconds apart. Output: 'light1 commit  Sun Nov 15 07:25:22 2026 -0500' (objecttype commit, taggerdate empty) and 'v1-submission tag Sun Nov 15 07:25:25 2026 -0500 ' (objecttype tag, committerdate empty). The annotated tag's date is when the tag was created (07:25:25), not the commit's date (07:25:22).
