显示git标记消息

显示git标记消息,git,tags,Git,Tags,所以 如果我这样做: git tag -a v4.2 -m 'my message' 然后我跑: git show v4.2 除了看到“我的消息”,我还看到了上次提交的消息 如何查看该标签的信息?来自: 对于标记,它显示标记消息和引用的对象 所以你所描述的应该很好。下面是一个完整的示例: $ git init Initialized empty Git repository in /Users/carl/Desktop/example/.git/ $ touch file $ git ad

所以

如果我这样做:

 git tag -a v4.2 -m 'my message'
然后我跑:

git show v4.2
除了看到“我的消息”,我还看到了上次提交的消息

如何查看该标签的信息?

来自:

对于标记,它显示标记消息和引用的对象

所以你所描述的应该很好。下面是一个完整的示例:

$ git init
Initialized empty Git repository in /Users/carl/Desktop/example/.git/
$ touch file
$ git add file
$ git commit -m "added a file"
[master (root-commit) 198fa55] added a file
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file
$ git tag -a sometag -m "tag message"
$ git show sometag
tag sometag
Tagger: Carl Norum <somebody@somewhere>
Date:   Mon Jul 8 10:10:49 2013 -0700

tag message

commit 198fa55868770ab78786e704dbb290cbeefac011
Author: Carl Norum <somebody@somewhere>
Date:   Mon Jul 8 10:10:42 2013 -0700

    added a file

diff --git a/file b/file
new file mode 100644
index 0000000..e69de29
$git init
已在/Users/carl/Desktop/example/.Git中初始化空Git存储库/
$touch文件
$git添加文件
$git commit-m“添加了一个文件”
[master(root提交)198fa55]添加了一个文件
1个文件已更改,0个插入(+),0个删除(-)
创建模式100644文件
$git tag-a sometag-m“标记消息”
$git show sometag
标签
标签:卡尔·诺伦
日期:星期一2013年7月8日10:10:49-0700
标记消息
提交198FA55868770AB78786E704DB290CBEEFAC011
作者:卡尔·诺伦
日期:星期一2013年7月8日10:10:42-0700
添加了一个文件
diff——git a/文件b/文件
新文件模式100644
索引0000000..e69de29