Show which git tag you are on?
I'm having trouble finding out which tag is currently checked out. When I do: git checkout tag1 git branch I can't seem to find out which tag I'm on. It only logs: * (no branch) master Is it possible to find out which tags are checked out? In the above example, this would be tag1 . bstpierre Edit : Jakub Narębski has more git-fu. The following much simpler command works perfectly: git describe --tags (Or without the --tags if you have checked out an annotated tag. My tag is lightweight, so I need the --tags.) original answer follows: git describe --exact-match --tags $(git log -n1 --pretty='%h