如何获得以前的标签名称?

flk*_*flk 8 git

有一些标签:

first
second
third
fourth
Run Code Online (Sandbox Code Playgroud)

我需要在"秒"之前得到标签(第三个).

ara*_*aer 21

git describe --abbrev=0 second^

  • 谢谢.这就是我需要的东西`git describe --abbrev = 0 --tags second ^` (2认同)
  • 你是刚刚复制了命令还是你真的有一个标签“秒”? (2认同)

Gug*_*upf 9

或者在最后两个标签之间

git log $(git describe --abbrev=0 --tags $(git describe --abbrev=0)^)...$(git describe --abbrev=0) 
Run Code Online (Sandbox Code Playgroud)