Can git specify tags that occur between two specific commits?

Is there a way to get git a list of all the tags that were added between the two commits? That is, show me the tags that appear between point A and point B.

+7
source share
2 answers

You can use the git log command with these parameters:

 git log tagA...tagB --decorate --simplify-by-decoration 

--decorate displays the tag names next to the commit, and --simplify-by-decoration shows only those that have been marked.

+8
source

If you only need a list of tag names (in reverse chronological order) between commit1 and commit2 , you can combine git log with xargs and git tag --points-at :

 git log commit1..commit2 --simplify-by-decoration --format=format:%h | xargs -L1 git tag --points-at 
+2
source

All Articles