How to find the latest tag from a git repository
I seem to be working on many current projects, so remembering the latest tag to roll up for a hotfix is always a pain.
You could be saying use
1 | git tag |
and scan through to find the highest one, but thats a complete pain, especially on an established project with many tags.
an excerpt from a current project.
1 | 1.0.4.1 |
The actual latest tag is 1.0.13.
Through the power of google I bring you the last tag command.
1 |
|
Save this in /usr/local/bin or to that effect and you need never remember again.
This way you can easily print the latest tagged commit for a repository.