git 命令查看日志和标签

git 命令查看日志和标签

当调用时,git log我会看到我所有的更改,当我调用时,git tag我会看到所有标签,但是我可以通过什么方式调用git来查看日志和标签,以便我可以看到在给定分支中的哪两个标签之间我进行了更改?

我最好有一个命令来交织日志和标签。最坏的情况是需要调用每个标签请求来获取更改列表,因为我们的存储库包含数千个标签...

先感谢您!

答案1

尝试git log --decorate

git-log(1)

--decorate[=short|full|auto|no]

Print out the ref names of any commits that are shown.
If short is specified, the ref name prefixes refs/heads/,
refs/tags/ and refs/remotes/ will not be printed.
If full is specified, the full ref name (including prefix)
will be printed. If auto is specified, then if the output
is going to a terminal, the ref names are shown as if short
were given, otherwise no ref names are shown.
The default option is short.

一些示例输出:

commit e0c1ceafc5bece92d35773a75fff59497e1d9bd5 (tag: v2.9.3, origin/maint)
Author: Junio C Hamano <[email protected]>
Date:   Fri Aug 12 09:17:51 2016 -0700

    Git 2.9.3

    Signed-off-by: Junio C Hamano <[email protected]>

相关内容