Git Tag Tips
Messing with tags and needing to find the latest
Windows + PowerShell
git tag --sort=-authordate:iso8601 | Select -First 1
- First part reference the
git tag
- Pass a sort parameter in this case the
authordate
in ISO8601 (the one format to rule all others) - Put a
-
in front of the sort parameter to tell git to reverse sort (newest first) - Pipe output to PowerShell and take first input
Linux/MacOS
git tag --sort=-authordate:iso8601 | head -n 1