# prints tag name or short revision
git name-rev --tags --name-only --no-undefined --always $(git rev-parse HEAD)
Tuesday, March 17, 2015
Print the current tag OR commit in git
Here's the command to print the tag name of the current commit, or just the commit if there is no tag.
It's useful for a script that builds or exports something and you always want to have some version reference..
Subscribe to:
Post Comments
(
Atom
)
1 comment :
Hello! Decent post! If it's not too much trouble reveal to us when I will see a development!
printing cheap
Post a Comment