For releases I usually tag with something like v1.1.0. During my build script I am creating a fwVersion.c file that contains the current git info. Currently, I have commit
It gives you all the tags the given commit has (whereas git describe only gives you one), and does not include tags on descendant commits (like git tag --contains does).