Hi Iam currently using git describe --abbrev=0 to get the latest tag, but it only returns one, what argument do I pass, and how do get the last 20 latest tags?
I tried user6346643 answer but it would also like it to not return duplicates
git describe --abbrev=0 $(git rev-list --tags --max-count=20)
CodePudding user response:
Adding to @user6346643's answer:
git rev-list --tags | xargs -n1 git describe | uniq | head -20
CodePudding user response:
Get last 20 latest tags
git describe (git rev-list --tags --max-count=20)