![git 命令查看日志和标签](https://linux22.com/image/1503935/git%20%E5%91%BD%E4%BB%A4%E6%9F%A5%E7%9C%8B%E6%97%A5%E5%BF%97%E5%92%8C%E6%A0%87%E7%AD%BE.png)
当调用时,git log
我会看到我所有的更改,当我调用时,git tag
我会看到所有标签,但是我可以通过什么方式调用git
来查看日志和标签,以便我可以看到在给定分支中的哪两个标签之间我进行了更改?
我最好有一个命令来交织日志和标签。最坏的情况是需要调用每个标签请求来获取更改列表,因为我们的存储库包含数千个标签...
先感谢您!
答案1
尝试git log --decorate
。
--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]>