I have a work flow where i want to use git tags to push releases though my pipeline.
git init touch readme.md git add . git commit -m "com1" git tag -a 1.0.0-rc.1 -m "t1" touch xxx git add . git commit -m "com2" git tag -a 1.0.0-alpha1 -m "t2" git tag -a 1.0.0-rc1 -m "t2" git tag -a 1.0.0 -m "r1" My log looks like:
commit 132fa7712234e0ea0ee72b55123d9fbfd7dbe75a (HEAD -> master, tag: 1.0.0-alpha1, tag: 1.0.0-rc1, tag: 1.0.0) Author: Ryan Date: Mon Nov 26 11:08:21 2018 +0000 com2 commit 97c10b1c203bc34f1234ba38e214c9f72cc4a03a (tag: 1.0.0-rc.1) Author: Ryan Date: Mon Nov 26 11:07:43 2018 +0000 com1 How can I ensure that only the most recent tag is returned?
git logdecorations:(HEAD -> master, tag: 1.0.0-rc.2, tag: 1.0.0). @Ryan wants to see(HEAD -> master, tag: 1.0.0). I don't think it's possible withgit log.git name-rev --name-only --tags --no-undefined HEAD 2>/dev/nullbut it is returning the alpha tag which is the 1st one added in that last commit.--decorate=fulldo the job for git log output?