我正在做
$ git tag
current
tag_example_to_test_task
$ git checkout tag_example_to_test_task
...
HEAD is now at 75fdde3... commit comment text example
$ git name-rev --name-only --tags HEAD
current
$ git describe --exact-match --tags
current
Run Code Online (Sandbox Code Playgroud)
我需要使用以下命令结束执行序列:
$ git "some command here"
tag_example_to_test_task
Run Code Online (Sandbox Code Playgroud)
怎么做?如何获取当前签出标签的标签名称?
我认为
git log -n 1 --pretty=format:'%d'
Run Code Online (Sandbox Code Playgroud)
应该可以解决问题。
但是,它会显示当前版本具有的所有分支的名称和标签。我认为不可能只获得用于检查修订版本的单个标签。
| 归档时间: |
|
| 查看次数: |
1469 次 |
| 最近记录: |