I have managed to list the git tags with the help of the following command:
git for-each-ref refs/tags --sort=-taggerdate --format='%(refname)'
as described in How can I list all tags in my Git repository by the date they were created?. The result looks as follows:
4.18.038
4.18.039
4.18.040
4.18.041
4.18.042
4.18.043
4.18.044
4.19.001
4.19.002
4.19.003
4.19.004
4.19.005
4.19.006
4.19.007
4.19.008
4.19.009
4.19.010
4.19.011
4.19.012
4.19.013
4.19.014
4.19.015
4.19.016
4.19.017
4.19.018
4.19.019
4.20.000
I would like to select only the last occurrence(latest) of each version. Eg.
4.18.044
4.19.019
4.20.000
Any ideas how I could achieve that?
PS. I am using Windows 7 with MINGW32